Description Usage Arguments Value Author(s) See Also Examples
View source: R/plot.ranktree.R
Plot the tree coming from the ranktree
or the pruning sequence of the ranktree
1 2 3 4 5 6 7 8 9 |
x |
An object of the class "ranktree" |
plot.type |
One among "tree" or "pruningseq" |
dispclass |
Display the median ranking above terminal nodes. Default option: FALSE |
valtree |
If plot.type="pruningseq", it shows the Tau_x rank correlation coefficient or the error along the pruning sequence on the training set. If valtree is the output of the function |
taos |
If plot.type="pruningseq", it plots the Tau_x rank correlation coefficient along the pruning sequence. If taos=FALSE, it plots the error. |
... |
System reserved (No specific usage) |
the plot of either the tree or the pruning sequence
Antonio D'Ambrosio antdambr@unina.it
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 | data("Univranks")
tree <- ranktree(Univranks$rankings,Univranks$predictors,num=50)
plot(tree,dispclass=TRUE)
data(EVS)
EVS$rankings[is.na(EVS$rankings)] <- 3
set.seed(654)
training=sample(1911,1434)
tree <- ranktree(EVS$rankings[training,],EVS$predictors[training,],decrmin=0.001,num=50)
plot(tree,dispclass=TRUE)
#test set validation
vtreetest <- validatetree(tree,testX=EVS$predictors[-training,],EVS$rankings[-training,])
dtree <- getsubtree(tree,vtreetest$best_tau)
plot(dtree,dispclass=TRUE)
#see the global weigthted tau_X rank correlation coefficients
plot(tree,plot.type="pruningseq",valtree=vtreetest)
#see the error rates
plot(tree,plot.type="pruningseq",valtree=vtreetest, taos=FALSE)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.