liveBook · Manning

Alternating least squares

Alternating least squares is an iterative optimization algorithm that alternately estimates each factor matrix while holding the others fixed.

How 2 Manning books explain it

AI Recommender Systems

Alternating least squares is a matrix-factorization algorithm that iteratively estimates latent factors for users and items by minimizing weighted reconstruction error.

How it is used
Serves collaborative filtering as a personalized candidate retriever or a scorer for candidates from other retrieval methods.
How deep it goes
Explains alternating closed-form updates and implements library training, but does not derive the least-squares solution.
Examples
Uses MovieLens ratings converted to positive interactions, a CSR matrix, and an implicit-library training listing.
What you can do after
Apply it via Python’s implicit library to train a recommender and tune its factors, regularization, and iterations on validation data.

Read how AI Recommender Systems explains alternating least squares →

AI-Powered Search

ALS is the alternating least squares algorithm, which estimates factor matrices by iteratively optimizing one factor while holding the other fixed.

How it is used
Deploys collaborative filtering to personalize search results from user–item interactions.
How deep it goes
Explains alternating optimization and rank, then demonstrates data preparation, Spark training, evaluation, and recommendation indexing.
Examples
Uses clicks, carts, purchases, product identifiers, Spark recommendations, and indexed user–product boosts.
What you can do after
Apply it via Spark to train recommendation models, evaluate RMSE, and produce personalized search boosts.

Read how AI-Powered Search explains alternating least squares →

What to know first

Related concepts

Questions about alternating least squares

What is alternating least squares?

Alternating least squares is an iterative optimization algorithm that alternately estimates each factor matrix while holding the others fixed.

Which Manning books explain alternating least squares?

AI Recommender Systems and AI-Powered Search.

What should I know before learning alternating least squares?

Manning books that teach alternating least squares usually introduce collaborative filtering and user-item interaction matrix first.

What is the difference between alternating least squares and baseline?

Alternating least squares is an iterative optimization algorithm that alternately estimates each factor matrix while holding the others fixed. A baseline is a reference model, result, measurement, or level used to compare performance or assess change.

What is alternating least squares a kind of?

Alternating least squares is a kind of matrix factorization. Matrix factorization is the decomposition or approximation of a matrix as a product of simpler, often lower-dimensional or structured matrices.

These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.