This project is an implementation of recommender system of movies based on the idea of 'collaborative filtering'. It applies rank-k decomposition on the users and movies data to 'construct' k features for each individual user and movie and it uses the method of alternating least squares to perform ridge regression for optimization of the objective function (which here is based on a squared-loss function). Then, with the trained model, we can predict each user's scores on unseen movies and can make recommendations based on the prediction.
The model in this project is a prediction of scores given by each user to every movie (including those not yet seen by the user) so that based on the predicted score, we can recommend movies to the users. Based on the data, we have a matrix Y of all the scores given by the users to the movies they have seen. Our objective is to construct a matrix X whose total loss as regards Y is minimized (here we use squared loss between X and Y). Critical procedures here include rank k factorization, alternating least square, ridge regression, etc. Note that in the code shown below, the outer loop of ALS is omitted. If interested, please refer to the project's GitHub page.
USER ID 270894
Now, after we have trained the model with the 100k data set from MovieLens, we can do some analysis on the data with our model. We have chosen the User with ID 270894 as our test case for illustration. We will look for the top ten movies recommended for this user and will also look for his favorite genre based on the sheer number of movies rated higher than 5.0 by him. Finally, we will also see how many movies among the top 50 recommendations for him by our model fall under his favorite genre
Now that we know something about the users' preferences and have an idea of what to recommend to them, we can expand the usage of this model. In fact, further analysis on the movies are carried out with the model we trained, including the overall similarity between all the movies, the internal similarity of movies in each individual genre, etc. To have a look at it, please go to my GitHub page at: https://github.com/Kharasso/movieLens_recommender_ALS