Senin, 27 Maret 2023

Data Sets (Distance (Euclidean))

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


We will calculate the data using the Euclidean distance.
The formula we will use is:


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:

So the next calculation is like this:

So, the distance between the two data using the Euclidean distance is 6.7823299831

Tidak ada komentar:

Posting Komentar