Cosinuslikhet
Cosinuslikhet, also known as cosine similarity, is a measure of similarity between two non-zero vectors in an inner product space. It is a scalar value that indicates the cosine of the angle between the two vectors. The value of cosine similarity ranges from -1 to 1. A value of 1 means the vectors are identical in direction, 0 means they are orthogonal (independent), and -1 means they are diametrically opposed.
The formula for cosine similarity between two vectors A and B is calculated as the dot product
For instance, if two documents contain similar keywords and phrases, their vector representations will point in