In this post, I will give an example of calculating distances using Minkowski distance.
I have 2 pieces of data.
This data consists of X data and Y data.
Data X consists of = 5, 3, 1, 0, 1
Data Y consists of = 1, 0, 3, 4, 2
r = 4
For Minkowski's calculations, there is a power that is r, which has a value of 1/r
To perform the following calculations :
The explanation is :
- 7 = is the first number of data X
- 1 = is the first number of data Y
- So the formula is X's first data minus Y's first data and so on
So the next calculation is like this :
The explanation is:
- 1/r is the power to which the last calculation will be performed
- r here is worth 4 (can be any value)
So, the distance between the two data using the Minkowski distance is 0.5
Tidak ada komentar:
Posting Komentar