cutreediv: Cut the tree

Description Usage Arguments Value Examples

Description

This function cuts the tree into several cluters by specifying the desired number of clusters.

Usage

1
cutreediv(tree, K)

Arguments

tree

the divclust object

K

an integer with the desired number of clusters.

Value

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

Examples

 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) #

chavent/divclust documentation built on May 13, 2019, 3:38 p.m.