liveBook · Manning

Inner product

As explained in AI Recommender Systems

A dot product is an operation that multiplies corresponding components of two vectors and sums the resulting products.

An inner product, commonly called a dot product, multiplies corresponding components of two vectors and sums the results. It measures both directional alignment and vector magnitude. For unit-length vectors, it produces the same ranking as cosine similarity while avoiding repeated normalization. section 3.1.2

Embedding similarity

Given two embedding vectors, compute their dot product to rank similar items. With normalized embeddings, this cheaper calculation replaces cosine similarity without changing the similarity result. section 3.1.2

Latent-factor prediction

Matrix factorization represents users and items as vectors in a shared latent space. A user's predicted preference for an item is their vectors' dot product: Peter's factors produce 0.90 for Pulp Fiction and −0.18 for Toy Story. section 3.3.1

Collaborative filtering

A user-item interaction matrix can use dot products to score user similarity. Shared consumption increases the score, after which unconsumed items are ranked by how often similar users consumed them. section 1.3.2

dot_product(A, B) = A B

Use the equation to connect the component-wise operation with vector similarity. section 3.1.2

Figure 3.4 Matrix factorization decomposes the user-item rating matrix (R) into two smaller matrices: user factors (U) and item factors (I). Each user and item is represented by k latent factors (typically 50-200 dimensions). The predicted rating for user u and item i is the dot product of their factor vectors.

Use the matrix-factorization figure to trace how user and item factor vectors produce predicted ratings. section 3.3.1

How AI Recommender Systems covers it

How deep it goes
Defines the operation, compares it with cosine similarity, and applies it in NumPy and matrix-factorization examples.
Examples
Uses normalized embeddings, movie ratings, user-item matrices, and comic-consumption patterns as concrete applications.
What it assumes
Assumes vectors, embeddings, and interaction matrices; introduces their use for similarity and preference prediction.
What you can do after
Apply it via NumPy to compute similarity, compare factor vectors, and rank recommendations.
How it connects
Connects vectors with cosine similarity, embeddings, matrix factorization, collaborative filtering, and latent factors.

Also explained in

Compare how 19 books explain inner product →

Related concepts

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