cubt {cubt} | R Documentation |
Construct a clustering unsupervised binary tree, the maximal tree, main function.
cubt(B, minsplit = 4, mindev = 0.001, minsize = 10, lp = 7, method = "cubt",critopt="anova")
B |
Data set to use |
minsplit |
minimum number of observations for a node to be split |
mindev |
minimum deviance attained for a split to be considered |
minsize |
Minimum size of a leaf to be validated |
lp |
Maximum depth for the tree |
method |
Not used at this stage |
critopt |
Choice for criterion: "anova" for using variance, "entropy" for entropy. |
Constructs an Unsupervised binary decision tree. May handle continuous or nominal data. For the continuous version, anova criterion should be used. When data are qualitative nominal, it should be converted to have the mode character. In this case, entropy based criterion is used. The tree obtained has one cluster per leaf. The structure of a cubt tree is similar to the class "tree" object. When plotted the number of observations is shown for within the leaves.
frame |
A data frame having the components: "var", the variable used for the split for non terminal nodes, "n" - the number of observations within the node, "dev"- teh deviance within the node, "yval" - actual equal to n, "splits" - a matrix given the left and right split and "label" - actually the node number. |
res |
Another representation for frame, unused in general. |
who |
A list giving the observations numbers belonging to each node of the tree. |
Badih Ghattas
"Interpretable Clustering using Unsupervised Binary Trees", Ricardo Fraiman, Badih Ghattas and Marcela Svarc, Adv Data Anal Classif DOI 10.1007/s11634-013-0129-3.
# genrate data from the first modele dd = gendata(1) Don = as.matrix(dd[,-1]) # construct the maximal tree aa = cubt(Don) # prune it toto = prune.cubt(aa,Don) # join leaves ooo = join.cubt(toto,Don) # plot the tree plot(aa,type="u") text(aa)