程序代写 6CCS3AIN, Tutorial 06 (Version 1.0)

6CCS3AIN, Tutorial 06 (Version 1.0)
1. Performk-Medianonthefollowinginput: x1 = 4 x2 = 2 x3 = 2 x4 = 1 x5 = 3 .
􏰂3􏰃 􏰂4􏰃 􏰂1􏰃 􏰂1􏰃 􏰂1􏰃 Assume that k=2 and the initial clusters location of the clusters are
􏰂1􏰃 􏰂2􏰃 μ1= 1 andμ2= 4 .
Recall, that the distance between two points is the sum of the absolute values. E.g., the distance between x1 and x2 is |3−4|+|4−2| = 3. In case of a tie, assign the data point to the cluster with the smaller ID.
2. How would the first assignment and update step look if we used k-Means instead?
3. Perform complete linkage on the following similarity graph. Note that the similarity of all edges that aren’t present is 0! Also note that sim(f,g) = 6, sim(g,h) = 11 and sim(f,i) = 8. Recall that in case of a tie always pick the cluster with the smallest ID and then merge it with the cluster that has the smallest ID among the ties. The smallest ID here is given by the alphabetical order. E.g., say you have S1 = {a, c}, S2 = {b,f}, S3 = {d,h} with sim(S1,S2) = 4, sim(S1,S3) = 5 and sim(S2,S3) = 5. So we have a tie here: dowemergeS1 withS3 orS2 andS3? TheIDofS1 isa,theIDofS2 isbandtheIDofS3 isd. So we pick S1 and then we merge it with the set having the smallest ID among all ties. In this case there is only S3. So we merge S1 and S3.
Here is the graph, good luck!
b1 10f h 2d
a43 2
9e c
61185 7i
g
1