Machine Learning with Python Projects - Book Recommendation Engine using KNN

When applying the given constraints, the books that are supposed to be included in our recommendation are being dropped from the dataset itself. Then how will we recommend them?

I’m using a pivot table to plot books x users and then passing it on to nearestneighbors but the same issue, if the books aren’t in the dataset itself how will they be recommended.

Your browser information:

User Agent is: Mozilla/5.0 (Windows NT 10.0; Win64; x64) AppleWebKit/537.36 (KHTML, like Gecko) Chrome/ Safari/537.36

Challenge: Machine Learning with Python Projects - Book Recommendation Engine using KNN

Link to the challenge:

What I see from your code is that you first filter out records whose users make less than 200 ratings, then filter out books with less than 100 ratings from the resulting dataframe. In this way you may consider the following case: Let’s say Book A originally has 110 ratings, but 20 of which are made by users who make less than 200 ratings, then should Book A be excluded from the dataframe?

And after the filtered dataset is stored in filtered_books, the following line looks problematic:


This drop_duplicates statement will drop ratings of different users on the same book…

I think yes, it should be because we are trying to get both frequent users and frequently rated books in our dataset, if we take an intersection of both of these sets then even if a book have >= 100 ratings but some of them are by non frequent users then we should not consider them.

and yes I shouldn’t have dropped books based on their titles. I’ll fix that part of the code and try again.

The language of the filtering conditions may open to different interpretations. Just keep in mind there are different possible ways of data cleaning in this project, and when things not seems to go right, you may reconsider the approach of data cleaning.

You may also check this older thread on this issue.

1 Like

Yes I also saw some other related projects after you mentioned that and it helped a lot, thanks!

This topic was automatically closed 182 days after the last reply. New replies are no longer allowed.