Skip to main content
added 479 characters in body
Source Link
Tim
  • 141.2k
  • 26
  • 270
  • 512

Euclidean distance (norm of difference) and dot predict are proportional to each other, so roughly the same:while they are not equal, but roughly the same.

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

asThis is also discussed in here and in the Vector space model: cosine similarity vs euclidean distance thread and Wikipedia. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.

Both metrics are similar and there are no strong reasons to prefer one over another in general.

Euclidean distance (norm of difference) and dot predict are proportional to each other, so roughly the same:

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

as also discussed in here. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.

Euclidean distance (norm of difference) and dot predict are proportional to each other, while they are not equal, but roughly the same.

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

This is also discussed in here and in the Vector space model: cosine similarity vs euclidean distance thread and Wikipedia. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.

Both metrics are similar and there are no strong reasons to prefer one over another in general.

added 34 characters in body
Source Link
Tim
  • 141.2k
  • 26
  • 270
  • 512

TheyEuclidean distance (norm of difference) and dot predict are proportional to each other, so roughly the same:

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

as also discussed in here. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.

They proportional to each other, so roughly the same:

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

as also discussed in here. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.

Euclidean distance (norm of difference) and dot predict are proportional to each other, so roughly the same:

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

as also discussed in here. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.

Source Link
Tim
  • 141.2k
  • 26
  • 270
  • 512

They proportional to each other, so roughly the same:

After normalizing $a$ and $b$ such that$\|a\| = 1$ and $\|b\| = 1$, these three measures are related as:

Euclidean distance = $\| a - b \| = \sqrt{\| a \|^2 + \|b\|^2 - 2 a^Tb} =\sqrt{2 - 2 \cos(\theta_{ab})}$

Dot product = $\|a\|\|b\| \cos(\theta_{ab}) = 1 \cdot 1 \cdot \cos(\theta_{ab}) = \cos(\theta_{ab}) $

Cosine = $\cos(\theta_{ab})$

Thus, all three similarity measures are equivalent because they are proportional to $\cos(\theta_{ab})$.

as also discussed in here. There was even an empirical evaluation by Qian et al (2004) concluding that

Through our theoretical analysis and experimental results, we conclude that EUD and CAD are similar when applied to high dimensional NN queries. For normalized data and clustered data, EUD and CAD becomes even more similar.