Tree-Clustering Comparison
trclcomp.RdThis function compares the within-group variation for groups formed by tree partitioning and unconstrained clustering. The results are plotted and returned invisibly.
Arguments
- x
Rpart object with method "mrt" – see
rpart- method
The clustering method for the unconstrained clustering
.
Details
The within-group variation for groups formed by multivariate tree partitioning and unconstrained clusterings are compared for all sizes of the hierarchy of tree partitions.
Value
Returns a list (invisibly) of the within-tree and within-cluster variation for all tree sizes.
References
De'ath G. (2002) Multivariate Regression Trees : A New Technique for Constrained Classification Analysis. Ecology 83(4):1103-1117.
Examples
data(spider)
fit <- mvpart(data.matrix(spider[,1:12])~herbs+reft+moss+sand+twigs+water,spider)
trclcomp(fit)
#> 1 2 3
#> MRT error : 1 0.481 0.336
#> MRT.Cluster error : 1 0.436 0.3
#> Cluster error : 1 0.436 0.341