Download as pdf or txt
Download as pdf or txt
You are on page 1of 2

M3-A1 K-MEANS CLUSTERING (MIDTERM)

Aristotle Q. Agcaoili/UE-ETEEAP
Jun. 21, 2024

Step #1
t1(p1)
t2(p2)
k=2

Step #2 Step #4 Step #6


Points x y t1 t2 t1[x=1,y=1] t2[x=5.3,y=5.8] t1[x=1.5,y=1.5]
p1 1 1 - - 0.0 9.1 1.0
p2 2 2 - - 2.0 7.1 1.0
p3 5 5 8 6 8.0 1.1 7.0
p4 6 6 10 8 10.0 0.9 9.0
p5 8 10 16 14 16.0 6.9 15.0

First Iteration (From Step #2) Second Iteration (From Step #4) Equals
C1 ={p1} C1(t1) ={p1,p2} =
C2 ={p2,p3,p4,p5} C2(t2) ={p3,p4,p5} =

Step #3 Step #5
t1x 1 t1x 1.5
t1y 1 t1y 1.5

t2x 5.3 t2x 6.3


t2y 5.8 t2y 7
12
10
8
6
4
2
0
0 2 4 6 8 10
t2[x=6.3,y=7]
11.3
9.3
3.3
1.3
4.7

Third Iteration (From Step #6)


C1(t1) ={p1,p2}
C2(t2) ={p3,p4,p5}
FINAL CLUSTER

You might also like