k-Means Clustering

Command: Image Analysis > Cluster Analysis > k-Means Clustering

The k-means clustering algorithm is an unsupervised algorithm which requires a user-defined number of clusters. The cluster analysis is performed using the loaded spectral descriptors, which may be (de)selected on an individual basis by ticking off the corresponding check box in the list of spectral descriptors. The results of the k-means clustering is displayed as a colored map, which can be processed in the usual way (copy to the 2D Imager, copy to the image stack, export to DataLab). Further, a particular class of pixels can be copied into the mask editor, thus enabling the user to exclude these pixels from further calculations.

The k-means algorithm is prone to unfavorable initial positions of the cluster prototypes. This can be circumvented by repeating the algorithm with different starting positions several times and finally using the set of starting conditions which result in the smallest intra-cluster distance. If you tick off the check box "Optimize", the k-means model is calculated 20 times, showing the best of these trials.

Further you can check the correlation among the cluster prototypes by looking at the cross correlation table. Those pairs of prototypes which have a correlation significantly higher than 0.3 are indicated in red color, the prototypes showing a significant correlation less than -0.3 are displayed in blue (the level of significance is by default 5%, but can be adjusted). Clicking any of the correlation values automatically displays the corresponding pair of cluster average spectra.

How To: Please follow these steps to perform a k-Means clustering:
  1. Select a list of descriptors which should form the basis of the analysis
  2. Select the scaling mode of the data.
  3. Enter the number of expected clusters.
  4. Optionally select a pixel mask if you want to exclude particular regions of the image from the clustering.
  5. Click the "Calculate" button.

Hint: You may transfer a particular class to a pixel mask by selecting the corresponding class in the list of found clusters followed by right-clicking the class entry (popup command "add the selected class to the pixel mask").