-1

I have 3 sets of values for X, Y & Z

eg

X = 7,8,7,8,6,9,8
Y = 8,7,7,6,7,8,8
Z = 8,8,8,7,8,9,9

I want compare the euclidean distance between these sets (X & Y and then X & Z) and convert it to a percentage to be able to convey the relative gap. Max and min values of all X & Y can be 10 and 0.

Is there a way to convert & convey the distance between X & Y and X & Z such that if all X values are 10 & Y all values are 0 (or vice versa), then percentage is 0 (meaning a perfect mismatch).

Similarly, if all X & Y values are 10, percentage is 100% (meaning a perfect match)

Gavin Simpson
  • 47,626
  • 2
    Why do you want to do this? Why not just compare your "percentages"? I ask in part because there is no general way to convert Euclidean distances into such "percentages" without introducing relatively large inaccuracies. – whuber May 12 '15 at 15:35

1 Answers1

2

Unless I'm missing something, just find the maximum Euclidean distance possible in your problem, the distance between P0 = (0,0,0,0,0,0,0) and P10 = (10,10,10,10,10,10,10). Now just divide whatever the distance is between X and Y by this maximal value, and subtract the answer from 1. Not really sure why you'd want to do this, though.

  • Thanks Matt. I was thinking along the same lines. Objective to do that is I want to convey fitment to a user between 2 sets (x,y) & (x,z). absolute eucledian distance makes little sense unless a max & min possible values are available hence the objective of max,min normalisation to convert to percentage. Any better method of doing so? –  May 13 '15 at 08:09
  • 1
    Not really, it just sounds like you want the distance as a proportion of the maximum possible distance. Although, keep in mind that point at (5,5,5,5,5,5,5), for example, can't have "maximal mismatch" of 0% from anything, since that "maximum" is measuring the largest possible mismatch in the entire space (from (0,0,0,0,0,0,0) to (10,10,10,10,10,10,10). To do it on a point-by-point basis, you'd need to find which one of the 2^7 "corners" of the data space (some combination of 0's and 10's) is most distant, and use that as your "maximal mismatch" value in the denominator. – Nuclear Hoagie May 13 '15 at 10:44