ALS Algorithm (interview preparation)

Source: Internet
Author: User

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)

Contact Us

The content source of this page is from Internet, which doesn't represent Alibaba Cloud's opinion; products and services mentioned on that page don't have any relationship with Alibaba Cloud. If the content of the page makes you feel confusing, please write us an email, we will handle the problem within 5 days after receiving your email.

If you find any instances of plagiarism from the community, please send an email to: info-contact@alibabacloud.com and provide relevant evidence. A staff member will contact you within 5 working days.

A Free Trial That Lets You Build Big!

Start building with 50+ products and up to 12 months usage for Elastic Compute Service

  • Sales Support

    1 on 1 presale consultation

  • After-Sales Support

    24/7 Technical Support 6 Free Tickets per Quarter Faster Response

  • Alibaba Cloud offers highly flexible support services tailored to meet your exact needs.