In this post, I will give an example of calculating distances using the Euclidean 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
To perform the following calculations:
The explanation is:
- 5 = 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 after that to the power of 2, and so on
It can also be written like this:
Tidak ada komentar:
Posting Komentar