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

logic error in function "get_top_ratings" when get "user_unrated_moies_RDD" #5

Closed
movingheart opened this issue May 5, 2016 · 2 comments

Comments

@movingheart
Copy link

file:engine.py ->function:get_top_ratings, code as
user_unrated_movies_RDD = self.movies_RDD.filter(lambda rating: not rating[1]==user_id).map(lambda x: (user_id, x[0]))
Element of self.movies_RDD as (movie_id, movie_title, movie_category), "rating[1]" represent "movie_title";I guess "self.movies_RDD" should be "self.ratings_RDD"; Please check this question.

@movingheart
Copy link
Author

This line can be:
user_unrated_movies_RDD = self.ratings_RDD.filter(lambda rating: not rating[1]==user_id).map(lambda x: (user_id, x[1]))

@jadianes
Copy link
Owner

jadianes commented May 5, 2016

Hi @movingheart,

You're right. Thanks!

@jadianes jadianes closed this as completed May 5, 2016
marius92mc added a commit to marius92mc/spark-movie-lens that referenced this issue May 14, 2016
Problem:
    All the movies from the recommendations are the same.

Fix:
    Revert changes from jadianes#5.
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