Quantify how similar a list of four numbers is.

59 Views Asked by At

I'm working on a program in which a user generates four distinct values from 1-256. I'd like to compare these four user generated values to two pre-generated lists of values and determine which of the pre-generated lists is most similar to the list input by the user.

My first instinct is to treat the lists as the coordinates of points in 4 dimensions and then calculate the euclidian distance between them. Whichever pre-generated point is "closest" to the user generated one is thus treated as the most similar.

For example, if the user generated: [1, 1, 1, 12]

And I had: List A = [1, 1, 1, 3] List B = [1, 1, 5, 100]

I would say that List A was the most similar to the user's input list.

Is this an intuitive way to solve this problem or is there a better solution? The context in which I am doing this is biofeedback readings based on measurements of 4 distinct muscles. I want to categorize small motions made with these muscles into one of two categories based on preset measurements (Lists A and B).

1

There are 1 best solutions below

0
On

Any distance (mathematically speaking) could be useful a priori. It strongly depends on what you consider to be "close". For example the infinite norm could be appropiate if your readings are "maximum strengh of each muscle" and you would like to see whether any of these 4 muscles can reach 100 or close to 100 (Newton?) of strengh or not, to know whether to link it to list B or not...

I don't know which distance could serve you better; but this article gives you a lot of examples of Norms in $R^n$.

https://en.wikipedia.org/wiki/Norm_(mathematics)

Good Luck!