recommenders / rival

RiVal recommender system evaluation toolkit
rival.recommenders.net
Apache License 2.0
150 stars 40 forks source link

Add custom behaviour to DataModelUtils.saveModel #120

Closed aleSuglia closed 7 years ago

aleSuglia commented 7 years ago

Hello,

using the saveModel method of the DataModelUtils it is not possible to specify a field delimiter that is used to write the lines on the file.

In order to be consistent with the loading procedure (implemented by SimpleParser), the method that can be used to save the model should allow users to specify the field delimiter. Do you think that it is an appropriate request?

P.S. Why do you insert a "-1" as an additional column? Is it required?

Best, Alessandro

abellogin commented 7 years ago

Good point! DMU should receive a field delimiter in both methods.

The "-1" is added to have the same field generated with a DataModel or a TemporalDataModel.

Best, Alejandro

aleSuglia commented 7 years ago

I have implemented a fix for this issue in my fork. Here there is the related commit: https://github.com/aleSuglia/rival/commit/e9f996f1aedd252f0bbdc2d7ae4bdc5bb328d9ee

alansaid commented 7 years ago

@aleSuglia perfect! Please do a pull request an we'll merge it.