Scala Machine Learning Projects: Recommendation Systems
When you talk about a movie recommendation system, you can’t help but think about Netflix. Netflix is an American entertainment company that uses a model-based collaborative filtering approach for real-time movie recommendation for its subscribers.
This article delves into a model-based movie recommendation engine with Spark that recommends movies for new users. You will see how to interoperate between ALS and matrix factorisation (MF) for the movie recommendation engine and use the movie lens dataset for the project.
Model-based recommendation with Spark
To make a preference prediction for any user, collaborative filtering uses a preference by other users of similar interests and predicts movies of your interests that are unknown to you. Spark MLlib uses Alternate Least Squares (ALS) to make a recommendation. Here is a glimpse of a collaborative filtering method used in the ALS algorithm:
Table 1 — User-movie matrix
In the preceding table, user ratings on movies are represented as a user-item matrix, where a cell represents ratings for a…