Questions tagged [cosine-similarity]

An angular-type similarity coefficient between two vectors. It is like correlation, only without centering the vectors.

132 questions
9
votes
1 answer

Weighted Cosine Similarity

To convert cosine similarity to weighted cosine similarity, one can use at least two approaches. But I don't know which one is better. The first approach is to first reweight each vector and then calculate a normal cosine similarity. In other…
Shayan
  • 271
  • 1
  • 4
  • 8
3
votes
0 answers

Normalized Levenshtein distance and triangle inequality

One question regarding to the triangle inequality of normalized Levenshtein Distance. I use the well-known form D(X,Y) = 1 - d(X,Y) / MAX(|X|,|Y|) where d(X,Y) is Levenshtein Distance. And I understand it violates the triangle inequality. But I…
Yukun
  • 31
  • 1
3
votes
3 answers

Cosine similarity indexing?

Are there any open source implementations out there that can efficiently solve the following. I'm given a fixed set $S$ of $n$-dimensional vectors of size $N$, where $N$ is of the order of a million. Given an n-dimensional vector $v$, I want to…
dst
  • 31
  • 2