
Cosine similarity measures orientation, not magnitude, making it more robust to irrelevant dimensions in high-dimensional spaces
Image: ChristinaC., CC BY-SA 4.0, via Wikimedia Commons
Cosine similarity measures orientation, not magnitude, making it more robust to irrelevant dimensions in high-dimensional spaces
List of algorithms
Cosine similarity measures the angle between vectors, not their magnitude
cosine similarity is preferred over dot product for normalized embeddings
Why do we need a special way to measure similarity in high-dimensional spaces?
Euclidean geometry
Euclidean distance measures absolute position in space
Manifold hypothesis
High-dimensional data lies on lower-dimensional manifolds
random projection to O(log n/ε²) dimensions preserves pairwise distances within 1±ε
Can you shrink a 3D object into 2D without losing its shape?
the dot product measures alignment: it equals |a||b|cos(θ)
Why do vectors sometimes "agree" with each other?
Swipe through 100 ML concepts daily
Open Pocket Polymath