Developer Guide for Intel® Data Analytics Acceleration Library 2019 Update 4

Details

Given the input dataset of size m x n, where m is the number of users and n is the number of items, the problem is to train the Alternating Least Squares (ALS) model represented as two matrices: X of size m x f, and Y of size f x n, where f is the number of factors. The matrices X and Y are the factors of low-rank factorization of matrix R:



Initialization Stage

Initialization of the matrix Y can be done using the following method: for each , and are independent random numbers uniformly distributed on the interval (0,1),

Training Stage

The ALS model is trained using the implicit ALS algorithm [Hu2008] by minimizing the following cost function:

where:

Prediction Stage

Prediction of Ratings

Given the trained ALS model and the matrix D that describes for which pairs of factors X and Y the rating should be computed, the system calculates the matrix of recommended ratings Res: