Description Usage Arguments Value Examples
This function cuts the tree into several cluters by specifying the desired number of clusters.
1 | cutreediv(tree, K)
|
tree |
the divclust object |
K |
an integer with the desired number of clusters. |
clusters |
the list of observations in each cluster |
description |
the monothetic description of each cluster |
which_cluster |
a vector of integers indicating the cluster of each observation |
B |
the proportion of inertia explained by the partition (between-cluster inertia/total inertia) |
leaves |
an internal list of leaves |
1 2 3 4 5 6 7 8 9 10 11 12 | data(protein) # pure quantitatives data
tree <- divclust(protein) # full clustering
p_5 <- cutreediv(tree,K=5) # partition in 5 clusters
p_5
data(dogs) # pure qualitative data
tree <- divclust(dogs) # full clustering
p_4 <- cutreediv(tree,K=4) # partition in 4 clusters
data(wine) # mixed data
data <- wine[,1:29]
tree <- divclust(data) # full clustering
p_4 <- cutreediv(tree, 4) #
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.