Cluster similarity matrix by k-means clustering

cluster_by_kmeans(mat, max_k = max(2, min(round(nrow(mat)/5), 100)), ...)

Arguments

mat

The similarity matrix.

max_k

maximal k for k-means clustering.

...

Other arguments passed to kmeans.

Details

The best number of k for k-means clustering is identified according to the "elbow" or "knee" method on the distribution of within-cluster sum of squares (WSS) at each k.

Value

A vector of cluster labels (in numeric).

Examples

# There is no example
NULL
#> NULL