Alex' Gardenアレックスの庭

Home

❯

5_Archive

❯

Other

❯

Uni

❯

Modules

❯

WS21 22

❯

NL1

❯

VL (1)

❯

VL10

❯

Cosine similarity

1 min read

📐 Cosine similarity

=== the ⚫️ Dot-product of two vectors, scaled by their magnitude (= 📏 Vector length) → difference between two vectors in terms of their angle==

Formula

==cosine(v,w)=∣v∣∣w∣v⋅w​==

  • v: vector 1
  • w: vector 2

Meaning

  • Result: in range [-1, 1]
  • -1: opposite direction
  • +1: same direction
  • 0: orthogonal

🔗 Links

⚫️ Dot-product 📏 Vector length 〰️ Word embedding

Graph View

  • 📐 Cosine similarity
  • Formula
  • Meaning

Backlinks

  • NL1 Lectures
  • Dot-product
  • 〰Word embedding