Compute the cosine similarity of two vectors to measure how closely their directions agree. Common in text matching, recall and embedding comparison.
取值 −1 到 1,越接近 1 越相似。
| Item | Formula / Note | Source / Standard |
|---|---|---|
| Definition | cosine = dot product over magnitude product from minus one to one | Vector metrics |
| Scale invariance | the measure depends on direction only | Vector metrics |
| Distance equivalence | with unit norms cosine and Euclidean distance interconvert | Vector metrics |