The data set used for this notebook is the 1M ratings data set from MovieLens. This contains 1M ratings of movies from 7120 movies and 14,025 Users. This data set includes:
- movieId
- userId
- rating
In addition a data set of the movies includes the movie name and genres.
- movieId
- title
- genres
The dataset can be found here : https://github.com/Gurupradeep/Movie-Recommendation-System/tree/master/Dataset
This type of recommendations are simple but very useful. Because they solve the cold start problem for users. That is without knowing anything about the user, we can do some recommendations to the user. After getting some reviews from the user or getting some additional information about the user, we can switch some of the more advanced model which are described below.
In the notebook, formula given by IMDB was used to calculate the best movies according to various genres and they can be recommended to any new user.
This recommender takes the approach of looking at at all users who have watched a particular movie and then counts the returns the most popular movie returned by that group.
Here just based on the ratings of the users for different movies, we use K nearest neighbours algorithm to find the movies which are similar.
Here we just information about the movies, in this case the information of genres to predict the most similar movies.
Two approaches were tried to do matrix factorisation, the low rank method is very slow, so used scipy's SVD for sparse matrix.
One popular recommender systems approach is called Matrix Factorisation. It works on the principle that we can learn a low-dimensional representation (embedding) of user and movie. For example, for each movie, we can have how much action it has, how long it is, and so on. For each user, we can encode how much they like action, or how much they like long movies, etc. Thus, we can combine the user and the movie embeddings to estimate the ratings on unseen movies. This approach can also be viewed as: given a matrix (A [M X N]) containing users and movies, we want to estimate low dimensional matrices (W [M X k] and H [M X k]), such that: A≈W.HT
- Keras
- Scipy
- Numpy
- Pandas
- python 3