liveBook · Manning

Alternating least squares

As explained in AI-Powered Search

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

Alternating least squares (ALS) factorizes a user–item interaction matrix for collaborative filtering. It learns user and item latent-feature weights by repeatedly optimizing one matrix while freezing the other. section 9.3.2

Search personalization

A product-search system aggregates user clicks into implicit preferences, trains Spark ALS with rank 10 and three iterations, and indexes ten recommendations per user as ranking boosts.

How AI-Powered Search covers it

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 it assumes
Assumes user–item interactions and introduces latent features, implicit ratings, integer indexing, rank, and alternating optimization.
What you can do after
Apply it via Spark to train recommendation models, evaluate RMSE, and produce personalized search boosts.
How it connects
Connects matrix factorization, latent features, collaborative filtering, implicit feedback, personalization, and search ranking.

Related concepts

This explainer was generated by Manning's knowledge graph from the text of AI-Powered Search. The section links point to the parts of the book it draws on.