1
$\begingroup$

Perform a hierarchical clustering (with five clusters) of the one-dimensional set of points $2, 3, 5, 7, 11, 13, 17, 19, 23$ assuming clusters are represented by their centroid (average) and at each step the clusters with the closest centroids are merged.

I begin with every point in its own cluster, i.e. $\left\{2\right\},\left\{3\right\},\left\{5\right\},\left\{7\right\},\left\{11\right\},\left\{13\right\},\left\{17\right\},\left\{19\right\},\left\{23\right\}$ I then know that the distance between any 2 clusters is the Euclidean distance between their centroids and we merge the 2 clusters at the shortest distance. However Im not sure how to calculate the centroids.

$\endgroup$
1
$\begingroup$

The cluster centroid $c$ of a cluater $C = \{v_1, v_2, \cdots, v_{|C|}\}$ is usually defined as $$ c = \frac{1}{|C|} \sum_{i=1}^{|C|} v_i $$ That is, it is the mean of the points.

$\endgroup$
  • $\begingroup$ So would the final answer be: $\left\{2,3\right\}, \left\{5,7\right\}, \left\{11,13\right\}, \left\{17,19\right\}, \left\{23\right\}$? This seems too simple as it is found after 1 step $\endgroup$ – Sophie Filer Apr 28 '17 at 16:09
  • 1
    $\begingroup$ @SophieFiler Note that in each iteration, we merge only the closest two groups. $\endgroup$ – PSPACEhard Apr 28 '17 at 22:59

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service, privacy policy and cookie policy

Not the answer you're looking for? Browse other questions tagged or ask your own question.