cluster_by_kmeans: Cluster similarity matrix by k-means clustering

Description Usage Arguments Details Value Examples

View source: R/cluster.R

Description

Cluster similarity matrix by k-means clustering

Usage

1
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

1
2
# There is no example
NULL

simplifyEnrichment documentation built on Nov. 8, 2020, 5:07 p.m.