Matrix Factorization using Alternating Least Squares
Published:
Matrix factorization plays a major role in the recommender systems. It:
- decreases the computations
- improves the performance as it increases the robustness of the system w.r.t. the noise.
In the following you can see how the matrix factorization works (Ref)
Now, we have two sets of vectors to determine: user-latent-features, and item-latent-features. We use alternating least squares to find them. The basic idea as follows:
Alternating Least Squares
- Fix user’s vector, use least squares to find item’s vector.
- Fix item’s vector, use least squares to find user’s vector.
- Repeat 1-2 until converge.
Codes & Results
The code consist of two parts. One is for the data preprocessing, and one implements and matrix factorization and gets the results.
To see the Github repository for this project, see Github.