Understand Cosine Similarity | 2 Minute Tutorial
Vložit
- čas přidán 15. 07. 2023
- This is a quick introduction to cosine similarity - one of the most important similarity measures in machine learning!
Cosine similarity meaning, formula and example!
If you like this video, hit a like and subscribe!
Paper icon used in a video:
www.flaticon.com/free-icons/p..." -Paper icons created by monkik - Flaticon
Such a simplistic yet on-point explanation.... cheers mate!
useful video and clear explanation! thank you and keep up the good work!
Glad it was helpful!
Indeed pretty amazing explaination, helped me a lot! Thanks.
Great having it explained in short! Thanks and waiting for the next one!
Very useful to have a quick recall on the calculation part 👍
Great stuff, thanks!
Glad you liked it!
Super well explained - thanks man!
Glad it was helpful!
Great and efficient explanations, you deserve million views, this help me alot. Can you explain about K-Nearest Neighbors? I would love to watch your explanation.
Great suggestion!
unbelievable
i have tommorrow exam and still writing this comment which i do not usually
thank you so much for such simple explanation and explaining 2 hour lecture in just 2 minutes thank you once again
Thank you!
Thank you, good work!
Glad it was helpful!
thanks!
Is the magnitude of B ~= 1.732 or ~= **2.236**
I was listening to a talk the other day, and someone mentioned that cosine similarity might be replaced eventually by something called "learned representation"? I may have it wrong, but have been struggling to find any info on it. Have you heard of that?
thanks for question!
Term "learned representation" is usually used when talking about embeddings. Those learned representations (or embeddings) are vectors made by an algorithm, and containing features extracted from input. Similarity or distance measures are used to measure how simmilar/different those embedings are. For example how simmilar are two faces, to images of a car etc.
@@danielkrei Oh, interesting! I thinking that the vector store had all of the embedded vectors that were high dimensional representations of what the model found in terms of similarity or relatedness, and that cosine similarity was the algorithm used to quantify relatedness between two ideas, words, or phrases? I didn't know if there was some new way of representing those connections, if adding to the vector store after the initial embeddings were generated would create issues. Maybe you'd be stuck recalculating the entire "matrix" if you added more info? Thanks for the video!
Can you explain why 3 vectors? Because there are three sentences? Then you got v1, v2, v3 and v1, v2 and v1, v3, why there is no v2, v3? Is it always first and then all others?
Isn't the task is to calculate the first one? So which is the most similar to the first one.
In this example I was looking for similarity between the first vector and the other two. Depending on the task you may compute the score for other pairs too.
Oh I thought cosine similarity ranged only between 0.0 and 1.0.
Good point! It really depends on data you are using but theoretical range is the same as the range of cosine [-1;1]