I'm trying to build a simple book recommendation system, where I don't have any kind of ratings (no comments, no likes, no 1-5 stars, ...).
The information I can use is the following:
- Book metadata : title, author, published date, model (printed or ebook), genres (one or more).
- Username.
- Type : category of interaction made by a user, it can be 'order' (if the user ordered the book) or 'access' (if the user just checked the book).
- Number : if 'type' = 'access' then this parameter indicates the number of times the user accessed the book.
So I have a DataFrame that looks something like this:
number type username product price model publishing_dt genres
0 6 access kerrigan 2345 12.99 printedbook 2020-02-01 fantasy,kids
1 4 access kerrigan 897 14.95 printedbook 2019-03-05 fantasy
2 1 orderline 45michael 86833 2.65 ebook 2020-02-04 action,war
3 1 orderline kerrigan 86833 2.65 ebook 2020-02-04 action,war
My goal is to develop a KNN system to make book recommendations and I can have two types of classifications:
- Item-based : similarity between books (by genre and author).
- User-based : similarity between users. Take each user purchases and compare them to other users to find similarities so if userA bought book1, book2 and book3 and userB bought book1, book2 and book4 you can assume that book3 is a good recommendation for userB.
But my doubt here is if I can develop a KNN system combining both technics, so depending on the data I input to it, it decides which solution is the better one.
Is this possible? Can someone point me in a good direction or send me some good tutorials?
EDIT - There are three scenarios:
- The user is logged in and there's enough purchase history information.
- The user is logged in but he/she is either new or there's not enough purchase history information.
- The user is not logged in.
Desired output:
- A combination of purchase history and book features (this is the case I don't know how to approach), it should take into account both the book features and the past purchases, maybe it would be a good choice to perform two searches instead of trying to make one.
- As there's not enough purchase history information, here the best approach would be to just use book features to make a recommendation.
- Same case as before.