Posts

Showing posts from April, 2022

Recommendation Systems: Notes and Interview Questions

Image
What is Content-based Filtering? Recommends items based on a user's purchase history, ratings and feedback. Eg: Flipkart. What is Collaborative Filtering? Matches customers who bought/watched similar items/movies to recommend products. Eg: Netflix. How items are recommended in Content-based Filtering? Let's take example of Netflix. They save all the information related to each user in a vector form which contains the past behavior of the user (movies liked/disliked by the user and the ratings given by them). This vector is known as the profile vector . All the information related to movies is stored in item vector . Item vector contains the details of each movie, like genre, cast, director, etc. The content-based filtering algorithm finds the cosine of the angle between the profile vector and item vector, i.e. cosine similarity . Suppose A is the profile vector and B is the item vector, then the similarity between them can be calculated as: Based on the cosine value (between -1