ALS Algorithm Description:
1, ALS algorithm is used to complement the user scoring matrix. Because the user scoring matrix is sparse, the user scoring matrix is decomposed into the product of V and U. By obtaining the two small matrices of V and U to complement the user scoring matrix.
2, the ALS algorithm uses the alternating least squares method to solve.
3, ALS is divided into two kinds of display feedback and implicit feedback. Display feedback refers to the user having a definite rating. For a product recommendation, most of it is through the user's behavior, get the implicit feedback score.
The implicit feedback scoring matrix needs to be processed, and if a user rating is set to 1, no value is assigned to 0. But for this post-processing scoring matrix, there is a confidence level to evaluate the score. Confidence equals 1+a* user real rating
4. The cost function of ALS is the sum of squares of the estimates and the existing scoring value errors, and the L2 regularization is introduced.
ALS Algorithm Parameters:
Parameter: Rating: Training set consisting of user-item matrix rank: number of hidden factors numiterations: Iteration number lambda: penalty factor for regular term alpha: confidence parameter
Steps for the solution of ALS alternating least squares:
The least squares method is to find the function that best matches the data by minimizing the sum of squares of errors.
Use alternating least squares to solve. The step is to set an X rule first and then solve the other matrix Y. Then fix a matrix Y and solve another matrix x. This is the step of alternating binary multiplication.
In the process of matrix solving, such as fixing y, solving X, target scoring matrix A. Each line of x can be solved independently, and the line I and y of X is computed by the line I of a.
In this case, the rows or columns of x or y can be solved independently in parallel for each step. In this way, the ALS can be computed in parallel.
ALS Algorithm (interview preparation)