The goal for this project is to produce recommendation using collaborative filtering (matrix factorization & cosine distance).
Project is made from three parts:
-
cross-validation, wich contains the tunning grid needed for ALS and calculates the accuracy using NDCG
-
making_reco, generates recommendation user based (ALS) and item based (cosine distance)
-
api_reco_als, which will deliver ALS recommendation for a user using an API
The library used for recommendation is https://github.com/rexyai/rsparse fallowing this excellent post http://dsnotes.com/post/2017-05-28-matrix-factorization-for-recommender-systems/.
For the API the RestRserve library was used https://restrserve.org/articles/RestRserve.html.
The model runs extremly fast, it can generate recommendation in ~ 300 secs for 138286 users for ALS and in ~ 200 secs for 8546 movies using cosine distance.