Answer the question
In order to leave comments, you need to log in
How to calculate the similarity of two objects?
There are two objects A and B, they can be represented as two arrays that consist of 5 elements. Each element contains data of a certain type, the data type in the A[0] element of the array is the same as in B[0], i.e. these elements can be compared with each other. Suppose we somehow calculate that the data in element 0 is like 40%, the data in element 1 is like 90%, and so on. And then we have similarity data for each element. How can one, having this data, calculate how similar both objects are?
Answer the question
In order to leave comments, you need to log in
Cartesian distance = root sum of squared element deviations, Hamming distance = number of elements with deviation > delta.
Arrays are considered as vectors. Two ways: subtraction and correlation (product)
1) There are several types of vector difference, this is called the difference norm. One of the options - see above (cartesian distance).
2) We normalize the vectors (i.e., divide by the maximum possible length), then multiply the pairs and sum. With this method, the answer 1 means a match, -1 - the opposite.
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question