multi_cluster_gen {ConsensusClustering} | R Documentation |
Multiple cluster generation
Description
Multiple cluster generation
Usage
multi_cluster_gen(X, func, rep = 10, param, method = "random")
Arguments
X |
input data Nsample x Nfeatures or a distance matrix |
func |
custom function that accepts |
rep |
number of repeats |
param |
vector of parameters |
method |
method for the choice of k at each repeat |
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 clustering is applied and result is returned.
Value
matrix of clusterings Nsample x Nrepeat
Examples
X = gaussian_clusters()$X
cluster_func = function(X, k){return(stats::kmeans(X, k)$cluster)}
Clusters = multi_cluster_gen(X, cluster_func, param = c(2,3))
[Package ConsensusClustering version 1.5.0 Index]