cornac icon indicating copy to clipboard operation
cornac copied to clipboard

[FEATURE] model reference on cvresult

Open daniel-deychakiwsky opened this issue 2 years ago • 6 comments

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.

daniel-deychakiwsky avatar Mar 02 '22 22:03 daniel-deychakiwsky

I would recommend using a reference of Experiment which has access to models, metrics, and results.

tqtg avatar Mar 04 '22 09:03 tqtg

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?

daniel-deychakiwsky avatar Mar 04 '22 15:03 daniel-deychakiwsky

You have the option to specify name of the model in its constructor.

tqtg avatar Mar 04 '22 15:03 tqtg

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.

daniel-deychakiwsky avatar Mar 04 '22 15:03 daniel-deychakiwsky

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.

tqtg avatar Mar 04 '22 15:03 tqtg

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.

daniel-deychakiwsky avatar Mar 04 '22 15:03 daniel-deychakiwsky