Skip to content
ignitae
Academy
Embeddings and similarity
Turn documents into vectors, measure their similarity, and find the nearest neighbour.
Syllabus
Term vectors
A document is a vector of term frequencies
Term-frequency vector (exercise)
Cosine similarity
Cosine measures the angle, not the length
Cosine similarity (exercise)
Nearest neighbour
Nearest neighbour is the highest cosine
Nearest neighbour (exercise)