Determine vectors similarity weighing the vectors lengths

75 Views Asked by At

I have many vector couples, for which I would like to assign a single number (for each couple) that signify their similarity. I am running a minimization algorithm on the whole group of vector couples so the relative 'similarity grade' between couples is important.

If they were all at the same length, cosine similarity would be my obvious choice. However, the vectors are not of same length and I would like to take their size differences into account.

My intuition of vectors similarity are :

  • Vectors with the same direction (d) but of different sizes (s1,s2) are more similar than vectors with same sizes (s1,s2) but of different directions (d1,d2).
  • Vectors of the same size (Sshort) with different directions (d1,d2) are more similar than the vectors of sam direction (d1,d2) with a larger size ((Slong).
    • In my context, this makes sense as (somewhat abstractly) if I wanted to align the 2 vectors I would have needed less "energy" to rotate the shorter ones.

Is there a standard method that determines vectors similarity along these lines?

Thanks!