Basically, Minkowski distance is used in machine learning to determine the similarity of distances.
Examples:
Input: vector1 = 0 2 3 4 vector2 = 2, 4, 3, 7 p = 3 Output: distance1 = 3.5033 Input: vector1 = 1, 4, 7, 12, 23 vector2 = 2, 5, 6, 10, 20 p = 2 Output: distance2 = 4.0
Note: Here distance1 and distance2 are almost the same, so they will be in the same near region.
|
Output:
3.503