Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- def recommend(self,topu=10):#no arguement required here, just for the sake of uniformness across other recommender implementations
- #return self.mean_ratings.ix[:topu,'title'].as_matrix(columns = None).tolist()
- self.mean_ratings = self.mean_ratings.sort(['movie_id'],ascending=True)
- self.mean_ratings = self.mean_ratings.ix[:,2:3]
- self.mean_ratings = self.mean_ratings.reset_index()
- del self.mean_ratings['index']
- return self.mean_ratings.ix[:topu,'title'].as_matrix(columns = None).tolist()
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement