Closed igor87z closed 9 years ago
I probably will need more info, but for now my can you please check what value did you set for min_values param when computing the SVD?
compute(self, k=100, min_values=???
My mistake. I forget change value of min_values from example. Set to 1 and everything works. Now I have one question. For cells that doesn't have a values in dat-file I need to add lines without values, only row and column identifiers, or such lines in the file should not be. Sorry, but I don't found example of dat-file.
And I get in recommendations rated items: In dat-file:
5156::6877715::37
5156::6877716::100
5156::6877717::78
5156::6878180::43
5156::6935490::73
5156::6935491::71
5156::6942420::91
5156::6942421::29
5156::6942597::74
5156::6942598::100
5156::6942599::100
5156::6942600::55
6877716, 6877715, 6877717 exists in recommend:
svd.recommend(5156, is_row=False)
[(6877716, 25.352191096345248), (6877715, 22.913767557647038), (6877717, 21.127898465135296), (6877718, 16.982821565501425), (6877714, 16.571863381535454), (6877720, 14.582520866868133), (6877719, 14.267469649710268), (6877713, 11.796344566506022), (6914703, 9.8264285723669271), (6914704, 9.3989017317142203)]
In dat-file if some items not rated by user such line doesn't exist, but if add lines like "
And if some item not rated by any user, how add these if not rated in the file should not be.
I don't quite get your comments above.
My advice here is that if you have items with only one (or zero) users and you want to include them in the recommendations, the results won't be good at all. You need more data to provide decent recommendations. That's why min_values is set to 10 by default. Maybe you could go as low as 5, but lower than that, the results from SVD will be bad.
I have a dat-file with 3705912 lines, matrix 602x6156. When I call svd.recommend for identifiers have little values I get KeyError.
But for identifiers have many values