Day 35 cosine similarity

Check out our live web application for this program - https://newdaynewlearning.netlify.app/

[!NOTE] There is a game waiting for you today, the best/first answer can win an exciting gift🎁

More about me:

I am just a Colleague of your’ s, Learning and exploring how Math, Business, and Technology can help us to make better decisions in the field of data science.

Topic : Cosine Similarity

  • When 2 phrases has nothing in common then Cosine Similarity score is 0 (cos 90 = 0)
  • When 2 phases are exactly same then Cosine Similarity score is 1 (Cos 0 = 1)
  • When there are some overlap between the 2 phrases then Cosine Similarity score is between 0 and 1 (Cos 0 - Cos 90)

Example : 

image

We compute the dot product of the occurrence vectors, and divide by the product of their magnitudes

image

  • Numerator is the dot product of the two vectors.
  • Denominator are the magnitudes of each vector.

Article Source :

TL;DR :

Cosine similarity is a measure of the angle between two vectors in a multi-dimensional space. It determines how similar two vectors are in terms of their direction, ignoring their magnitude or length. The closer the angle is to 0 degrees (or 0 radians), the more similar the vectors are, and the similarity is measured by the cosine of that angle. 

image

Notes mentioning this note


Here are all the notes in this garden, along with their links, visualized as a graph.