質問

I have 2 fixed length arrays of doubles. I want to get a similarity measure of these 2 arrays. The closer each elements in the arrays are the more similar the 2 arrays are.

What kind of metric or algorithm is there to achieve that?

役に立ちましたか?

解決

Simplest and universal is "Sum of Squared Differences" In case of scaled data can help "Normalized cross correlation"

Also you can read about different "norm" L1, L2, INF and others. All it depend from your practical task.

他のヒント

You can use cosine similarity, which is a measure insensitive to the magnitude of data, as it calculates the angle between the vectors.

enter image description here

See also: https://en.wikipedia.org/wiki/Cosine_similarity

ライセンス: CC-BY-SA帰属
所属していません StackOverflow
scroll top