Pergunta

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?

Foi útil?

Solução

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.

Outras dicas

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

Licenciado em: CC-BY-SA com atribuição
Não afiliado a StackOverflow
scroll top