zenogantner / MyMediaLite

recommender system library for the CLR (.NET)
http://mymedialite.net
499 stars 192 forks source link

SlopeOne can return bigger predicted ratings than MaxRating #400

Closed sidooms closed 11 years ago

sidooms commented 11 years ago

I suggest similar approach as with BiPolarSlopeOne (at the end of Predict function):

if (result > MaxRating) return MaxRating; if (result < MinRating) return MinRating;

zenogantner commented 11 years ago

Hi Simon, thank you for your report. If you want, you can send a push request. But I can also do it - as you wish.

sidooms commented 11 years ago

Hi Zeno,

Would be easier if you did it, I don't have the source installed here at the moment.

On Thu, Feb 28, 2013 at 12:33 PM, Zeno Gantner notifications@github.comwrote:

Hi Simon, thank you for your report. If you want, you can send a push request. But I can also do it - as you wish.

— Reply to this email directly or view it on GitHubhttps://github.com/zenogantner/MyMediaLite/issues/400#issuecomment-14229112 .

zenogantner commented 11 years ago

OK!

sidooms commented 11 years ago

Sorry to continue on a closed issue, but...

Maybe instead of cutting of the predicted rating value you could also remap the ratings to the appropriate interval like:

def remap(value, low1, high1, low2, high2): return low2 + (value - low1) * (high2 - low2) / (high1 - low1)

(http://stackoverflow.com/questions/3451553/value-remapping)

When I run the SlopeOne algorithm I get values in the interval [-2,9], using the above remapping, the value 5 maps to 3 in the interval [1,5] which maybe makes more sense?

zenogantner commented 11 years ago

Hi, it is entirely okay to continue on any issue.

1. How easy is it to implement this reliably? E.g., can the interval [-2,9] be computed in advance (i.e. after training, before making the first prediction)?

2. And, more importantly, does it give better results than just cutting?

If there are good answers to both questions, we could have it this way.

sidooms commented 11 years ago

I have absolutely no idea. I will look into that.