# What is the best way to find similarity between two bodies?

Suppose we have two human bodies. We need to find some number that represents a similarity score between the two bodies. However in order to achieve that we need to find the similarity between the corresponding body parts. Suppose we already have a function that returns a similarity score for body parts.

Example:

double armSimilarity = compare(person1.arm, person2.arm);


So we end up with a vector that has similarity scores each representing similarity between a certain body part.

Given that the score is 0 when they are identical and goes up in value the more they differ from each other; how could we reduce that vector into a single number that we can use to determine the similarity between the two bodies as a whole?

Is taking the average a good idea?

• Depends. I don't think this can be answered without any context. Community votes, please: too broad? Unclear? – Raphael Apr 24 '17 at 18:19
• Choose some linear combination of the scores. Another option is to choose a (possibly weighted) maximum. More generally, you can compute the $L_p$ norm of the vector with respect to some measure (i.e., with weights). – Yuval Filmus Apr 24 '17 at 19:21