K-Means clustering

This tool implements k-means clustering from the scipy library. In particular this uses kmeans2 to cluster an input point dataset. The cluster labels are then added to a label field in the output dataset. In addition the centroids of the clusters are output to a new dataset, also with the label field.

Input parameters

Input layer

The base point dataset. The selected points within this dataset will be clustered and written to the output dataset along with a cluster field.

K (number of clusters)

The number of clusters built by the algorithm. This does not guarantee that this many clusters will be formed.

Method for initialization

The method for first guessing where the cluster centroids will be. For more detailed explanation see the kmeans2 documentation.

Output parameters

Clustered features

The point dataset with the cluster IDs written to the label field. All other fields of the feature are preserved.

Cluster centroids

The point dataset with the cluster centroids. The cluster centroids are tagged with the cluster ID using the label field name.