In this post, I will give an example of calculating distance comparisons using the Minkowsky distance.
I have 3 pieces of data.
This data consists of X data, Y data and Z data.
Data X consists of = 5, 0, 2, 7, 0
Data Y consists of = 1, 7, 0, 2, 3
Data Z consists of = 1, 4, 4, 3, 1
r = 3
From the data above, we will look for a comparison of the distance between Data X to Data Y, Data Y to Data Z and Data Z to Data X
Distance of Data X to Data Y
So, the distance from Data X to Data Y is 0.33333
Distance of Data Y to Data Z
So, the Distance of Data Y to Data Z is 0
Distance of Data Z to Data X
So, the Distance of Data Z to Data X is -0.33333
From the results of the three distances found as follows:
From the data above, the distance obtained from Data Y to Data Z is the closest distance with a value of -0.33333
Notes :
- It should be remembered that the distance has no negative results, because here there are negatives due to data errors.
Tidak ada komentar:
Posting Komentar