Issue
I am learning the collaborative learning algorithm and the sklearn surprise library but I am curious as to what is the use of this parameter in the .predict function.
The documentation states:
We can now predict ratings by directly calling the predict() method. Let’s say you’re interested in user 196 and item 302 (make sure they’re in the trainset!), and you know that the true rating rui=4:
But, the rating is what I am trying to predict. What would be the use of passing it to this function if I already have it?
Solution
It's not used to make a prediction. It's there so you can easily compare the predicted value against the actual value.
If you look at the source code r_ui
is never used for any calculations and is passed to the Prediction class which just stores the result and formats the string for printing.
Answered By - Harpal
0 comments:
Post a Comment
Note: Only a member of this blog may post a comment.