$ ./guess_the_languageAI & ML
AI & ML · medium · #39

What is the cosine similarity of a and b?

a = [1, 0, 1]
b = [1, 1, 0]
  1. 0.5
  2. 1.0
  3. 0.0
  4. 0.71
Dot product 1 divided by (sqrt(2) * sqrt(2)) = 1 / 2 = 0.5.
Play AI & ML ▸