multi_kmeans_gen: Multiple K-means generation

View source: R/CC_without_robScore_functions.R

multi_kmeans_genR Documentation

Multiple K-means generation

Description

Multiple K-means generation

Usage

multi_kmeans_gen(X, rep = 10, range.k = c(2, 5), method = "random")

Arguments

X

input data Nsample x Nfeatures

rep

number of repeats

range.k

vector of minimum and maximum values for k c(min, max)

method

method for the choice of k at each repeat c("random", "silhouette")

Details

At each repeat, k is selected randomly or based on the best silhouette width from a discrete uniform distribution between range.k[1] and range.k[2]. Then k-means clustering is applied and result is returned.

Value

matrix of clusterings Nsample x Nrepeat

Examples

X = gaussian_clusters()$X
Clusters = multi_kmeans_gen(X)


ConsensusClustering documentation built on Sept. 11, 2024, 6:38 p.m.