Question: Note: - Use 3 centroids, K = 3 . - Your calculations should be only for the first iteration only. Income Spending Score 1 5

Note:
- Use 3 centroids, K=3.
- Your calculations should be only for the first iteration only.
Income Spending Score
1539
1581
166
1677
1740
1776
186
1894
193
1972
As the first step I will select 3 points for initiating centroids.
C1(16,6)
C2(18,6)
C3(19,3)
Then we will calculate distance between C1, C2, C3 and all data. Use Squared Euclidean to calculate distance.
Squared Euclidean distance=(x1x2)2+(y1y2)2
C1(16,6) C2(18,6) C3(19,3)
I1(Instance1)=1090 I1(Instance1)=1098 I1(Instance)=916
I2=1626 I2=5634 I2=5200
I3= O I3=4 I3=18
I4=5041 I4=5045 I4=4633
I5=1157 I5=1157 I5=965
I6=4901 I6=4901 I6=4493
I7=4 I7=0 I7=10
I8=7748 I8=7744 I8=7226
I9=18 I9=10 I9=36
I10=4365 I10=4357 I10=3969
Assign each data point to the cluster corresponding to the nearest centroid.
C1 C2 C3
I2=1626 I7=0 I1=916
I3=0 I8=7744 I4=4633
I9=10 I5=965
I6=4443
I10=3969
Calculate mean of the data points in each cluster to determine the new centroid positions.
We will get instances for C1, C2, C3 then calculate the average.
C1=(15+16)/2,(81+6)/2=15.2,43.5
C2=(18+18+18)/3,(6+94+3)/3=18.3,34.3
C3=(15+16+17+17+19)/5,(39+77+40+76+72)/5=16.8,68.6
After each iteration, reassess the cluster assignments based on the updated centroids.
C1=(15.5),(43.5) C2=(18.3),(34.3) C3=(16.8),(68.6)
C)(15 Points) Provide an example of a K-means limitation using the data points in Q1.B dataset only.

Step by Step Solution

There are 3 Steps involved in it

1 Expert Approved Answer
Step: 1 Unlock blur-text-image
Question Has Been Solved by an Expert!

Get step-by-step solutions from verified subject matter experts

Step: 2 Unlock
Step: 3 Unlock

Students Have Also Explored These Related Programming Questions!