Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

It contains a serious bug. #99

Open
rabintang opened this issue Jun 30, 2014 · 1 comment
Open

It contains a serious bug. #99

rabintang opened this issue Jun 30, 2014 · 1 comment

Comments

@rabintang
Copy link

In knn/classes.py UserBasedRecommender.estimate_preference, the following codes

  1. prefs = prefs[~np.isnan(prefs)] # prefs = [1, 2, 4]
  2. similarities = similarities[~np.isnan(prefs)] # similarities = [0.1, 0.2, 0.3], but actually it show be [0.1, 0.2, 0.4]
  3. prefs_sim = np.sum(prefs[~np.isnan(similarities)] * similarities[~np.isnan(similarities)])
    have a serious bug, assuming that initial prefs = [1, 2, non, 4], similarities = [0.1, 0.2, 0.3, 0.4].
@tyutjxs
Copy link

tyutjxs commented Apr 27, 2018

do you have resolved it?

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants