Cosine Similarity of Item Features#
Similarity as the cosine of the angle between two items’ feature vectors.
Important
✨ AI-generated content. This page was written with the assistance of an AI language model and is provided as a learning aid. Despite careful review, it may still contain mistakes, omissions, or out-of-date information. Whether you are new to the topic, a team lead, or a senior practitioner, treat it as a starting point rather than an authoritative reference: read it critically and independently verify anything you act on (code, commands, figures, and factual claims) against official documentation and primary sources before relying on it.
What it is#
Cosine similarity measures how alike two items are by the cosine of the angle between their feature vectors — representations built from metadata (one-hot genres, tags, text) or learned embeddings. It captures orientation, not magnitude, so it is invariant to vector length.
The formula#
ranging from \(-1\) to \(1\) (0 to 1 for non-negative features) — 1 means identical direction (very similar), 0 means unrelated (orthogonal).
Where it’s used#
It powers content-based filtering and item-item similarity (recommend items close to those a user liked), and it is the usual kernel for computing intra-list similarity / diversity.
Theme: Recommender Systems · All terminology
Hint
Mind map — connected ideas
Jaccard index · Intra-List Diversity (ILD) · Embedding Similarity · Genre Overlap · Embedding · Relevance in Recommender Systems
Hint
More in Recommender Systems
Catalog Coverage · Diminishing Utility · Diversity (in Recommender Systems) · Dominating in Recommender Systems · Genre Overlap · Hit Rate (HR) · Intra-List Diversity (ILD) · Item Coverage · Jaccard index · Novelty (in Recommender Systems) · Relevance in Recommender Systems · Self-Information of Popularity · User Coverage
See also
Source article Adapted (context, re-expressed) in our own words from: Cosine Similarity of Item Features (insightful-data-lab.com).