cornac
cornac copied to clipboard
[FEATURE] model reference on cvresult
Description
Is it possible to include a reference to the cornac model that is associated to the CVResult? Currently, only model_name
is available but we may need to access other properties on the cornac model from the CVResult. By placing a reference to the model, we can get the model name and any other attribute that we may have added to the model.
I would recommend using a reference of Experiment which has access to models, metrics, and results.
Imagine a use case where two of the same type of model are compared in the cross validation routine for say, SVD(k=100) and SVD(k=200). In this case, these model's will have the same model name. There may be other attributes or metadata that we added to these models to track things like version and type (that we added manually). The issue is connecting the CVResult object to the instance of the model since all CVResult has is the model name. If we use the Experiment, it does have the list of the models but they're not explicitly connected to their corresponding CVResults. In this case, using the Experiment wouldn't help - does that make sense?
You have the option to specify name of the model in its constructor.
That's true but that means we'd have to pollute the name of the model with the information that we wanted to pass through like type, version, and or any other piece of metadata.
I don’t get it. You just need a unique identifier for each model serving as the model name. Then, you just use the experiment to access to any models and their results using such identifiers.
Are you suggesting that we pass a unique identifier for the model's name when we construct the model, e.g., SVD(k=100, name='unique'). This way we would have this identifier via the CVResult and should be able to stitch that back via Experiment to get the actual reference? We could do that but it is cumbersome. It would be a lot simpler to have a direct reference or someway of getting a model from the CVResult.