In: Computer Science
At the end of second epoch:
Let C1 & C2 represents the cluster means, and after 2nd epoch C1 & C2 turns out to be
C1 = (1.25 , 1.5)
C2 = (3.9 , 5.1)
a) The distance matrix :
A1 | A2 | A3 | A4 | A5 | A6 | A7 | |
C1 | 0.56 | 0.56 | 3.05 | 6.66 | 4.16 | 4.78 | 3.75 |
C2 | 5.02 | 3.92 | 1.42 | 2.2 | 0.41 | 0.61 | 0.72 |
the euclidean distance formula is given as
where
is the ith dimension of the points.
For example: The euclidean distance between C1 = (1.25, 1.5) and
A1 = (1, 1) can be calculated as
b) The new clusters are as following:
A data point gets associated with the cluster mean which is closest to it hence:
c) The centers of the clusters after 2nd epoch are:
C1 = (1.25 , 1.5)
C2 = (3.9 , 5.1)
d) After the 2nd epoch the algorithm should stop.