| plot.TWIX {TWIX} | R Documentation |
Plot an TWIX or bootTWIX object generated by
TWIX or bootTWIX function(s).
## S3 method for class 'TWIX':
plot(x, sq = 1:length(x$trees), type = "deviance",
i.plot = FALSE, size = 3, freq = TRUE,
breaks = "Sturges", pch = par("pch"), ...)
x |
an object of class TWIX. |
sq |
Integer vector giving the number of trees to be plotted. |
type |
one of "deviance", "ccr","d&c". |
i.plot |
logical. If TRUE, iplot will be used (library iplot will be required). |
size |
value for largest circle (cex). |
freq |
logical. Should the frequence or density be plotted. |
breaks |
see histogram. |
pch |
a vector of plotting characters or symbols. |
... |
graphical parameters can be given as arguments to 'plot'. |
If type = "deviance":
the training deviance vs. test deviance will be plotted.
If type = "ccr":
the correct classification rate(CCR) for training data vs. the CCR for test data.
If type = "d&c":
the deviance vs. CCR for test data.
data(olives)
### train and test data
set.seed(123)
i <- sample(572,150)
ic <- setdiff(1:572,i)
training <- olives[ic,]
test <- olives[i,]
TM1 <- TWIX(Region~.,data=training[,1:9],test.data=test,
topN=c(5,3),method="local")
plot(TM1)
plot(TM1,type="ccr")
plot(TM1,type="d&c")