00:01
Hello student, to apply the k -means algorithm we need to follow these steps.
00:03
Step 1.
00:04
Initialize the cluster with some data point as centroid.
00:07
Step 2.
00:08
Assign each data point to the nearest centroid based on the chosen distant matrix.
00:13
Step 3.
00:14
Update the centroid based on the mean of the data points in each cluster.
00:19
Step 4.
00:20
Repeat step 2 and step 3 until the centroid is no longer changed.
00:25
So let's apply the k -means algorithm step by step using the provided initial cluster and the dataset.
00:32
So given initial clusters are c1, c2, c3.
00:36
So c1 given 2, 2, 4, 4, 6, 6.
00:39
C2 0, 4, 4, 0.
00:41
C3 5, 5, 9, 9.
00:43
And c4 is given 8, 8.
00:45
So these are the four clusters which are given to us.
00:48
And after that we have to follow the step number 2.
00:53
Assign each data points to the nearest centroids based on the chosen distance matrix.
00:59
So assign each data point to the nearest centroids.
01:02
So here c1, 2, 2, 4, 4, 6, 6.
01:05
C2 0, 4, 4, 0.
01:07
C3 5, 5, 9, 9.
01:09
And c4 8, 8.
01:10
Now come to the third step update the centroids.
01:14
Now we have to update the centroids.
01:16
So here for c1, 4, 4.
01:20
C2, 2, 2.
01:21
And for c3, 7, 7.
01:23
And for c4, 8, 8.
01:25
So this is calculated by taking the mean...