| ... | ... | @@ -16,7 +16,7 @@ Let’s give an example. Imagine that we have 2D data space (for visualization) |
|
|
|
|
|
|
|
Let’s talk visually. Image that our data is spread in 2D data space as shown in Fig 1(i). As the user, we have decided that we expect two classes (will be shown in blue and red). First step is to assign randomly the stereotypes for clusters μ1 and μ2(shown as x symbols). Then, we will compute the distance between each sample and our stereotypes; and assign them to the nearest stereotype (Fig 1(ii,iii)). At this stage, we do not know how true our “centre of cluster” is. In the third step, we will evaluate the stereotype centres (rather than assuming it) from the assigned labels (Fig 1(iv)). In the fourth step, we will reassign the samples to the new cluster centres. This procedure is followed iteratively until a convergence criterion is achieved.
|
|
|
|
|
|
|
|
<img src="uploads/d91ac5ec305465c9366bfc57b3271229/cluster_0.png" width="600">
|
|
|
|
<img src="uploads/5d50db920c0249bfaefe1917ca67704f/cluster_0.png" width="600">
|
|
|
|
|
|
|
|
Fig. 1 Flat clustering: how k-means work
|
|
|
|
|
| ... | ... | |
| ... | ... | |