News for hackers. Stuff that matters.
Re:How does cosine similarity work? by immibis on Friday September 06, 2024 @07:46PM (#41470534)
Impossible because... you lost a dimension.
Re:How does cosine similarity work? by extasia on Friday September 06, 2024 @08:47PM (#41470775)
That’s not mathematically accurate though, is it? We haven’t reduced the dimension of the vector by one.

Pray tell, which dimension do we lose when we normalize, say a 2D vector?

Re:How does cosine similarity work? by creata on Friday September 06, 2024 @10:51PM (#41471186)
Mathematically, it's fine to say that you've lost the magnitude dimension.

Before normalization, the vector lies in R^n, which is an n-dimensional manifold.

After normalization, the vector lies in the unit sphere in R^n, which is an (n-1)-dimensional manifold.

Re:How does cosine similarity work? by thaumasiotes on Friday September 06, 2024 @09:38PM (#41470962)
Magnitude, obviously.

>>> Magnitude is not a dimension [...] To prove this normalize any vector and then try to de-normalize it again.

Say you have the vector (18, -5) in a normal Euclidean x, y plane.

Now project that vector onto the y-axis.

Now try to un-project it again.

What do you think you just proved?

Re:How does cosine similarity work? by langcss on Saturday September 07, 2024 @04:48AM (#41472526)
A circle circumference is a line, is 1D?