| ml_cut_tree | R Documentation |
Flatten the dendrogram clustering results based on the number of requested groups.
ml_cut_tree(linkage, num_orig_objs, num_clusters)
linkage |
A numeric matrix representing linkage, generated by |
num_orig_objs |
Original number of observations data rows. |
num_clusters |
Target flat group capacity. |
An integer vector mapping observation indexes to cluster arrays.
Other ML methods:
MLElasticNet,
MLElasticNetCV,
MLLpNormScaler,
MLPCA,
MLRidge,
MLRidgeCV,
MLSVD,
MLZScoreScaler,
ml_agglomerative_cluster(),
ml_distance_metric,
ml_linkage_method
set.seed(1)
data <- matrix(rnorm(30), nrow = 10)
linkage <- ml_agglomerative_cluster(data, method = ml_linkage_method$Ward)
ml_cut_tree(linkage, num_orig_objs = 10, num_clusters = 3)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.