practical-recommender-systems / moviegeek

A django website used in the book Practical Recommender Systems to illustrate how recommender algorithms can be implemented.
MIT License
901 stars 360 forks source link

fixed issued with the wrong weights being assigned to events. #60

Open Walter-Ullon opened 2 years ago

Walter-Ullon commented 2 years ago

Hello Kim,

I have started going over the code and the simulated data and trying to replicate it all in python-pandas in a local repo to ensure I understand all the steps and can derive things on my own.

I have come across this issue where in the textbook, as well as line 58 of implicit_rating_calculator.py, you designate "moredetails" as w2 (50), but in line 93 you have it switched with "details".

There's one other issue I will create a PR for once I find it, but in listing 4.1 of the textbook, you do a count(CASE... using moredetails as the event, when in fact in should be moreDetails. This is causing the simulated data to contain all zeroes under moreDetails when counting events for users. I have checked this locally and can confirm. This will skew all implicit ratings.

Cheers!