Reputation: 2285
How can I measure the difference/similarity of two vectors?
That is...Let us suppose that I have two vectors in R^3: v1 = {1,8,3} v2 = {2,5,10} Let us consider that v1 and v2 are representing directions.
I would like to measure how much v1 and v2 are pointing to the same direction.
Upvotes: 0
Views: 3569
Reputation: 142977
There are a number of different "similarity" measures between vectors, but one of the more popular ones is cosine similarity, i.e. the cosine of the angle between them.
This measure is convenient because it will give a number between -1 and 1, where 0 means that the vectors are perpendicular, 1 means that the vectors point in exactly the same direction, and -1 means that the vectors are diametrically opposed.
Upvotes: 1