bagg.default {TWIX} | R Documentation |
Predictions from TWIX's or Bagging Trees
Description
Prediction of a new observation based on multiple trees.
Usage
## Default S3 method:
bagg(object,data=NULL,sq=1:10,...)
## S3 method for class 'TWIX':
bagg(object,...)
## S3 method for class 'bootTWIX':
bagg(object,...)
Arguments
object |
object of classes TWIX or
bootTWIX . |
data |
a data frame of new observations. |
sq |
Integer vector indicating for which trees predictions are required. |
... |
... |
See Also
TWIX
, predict.TWIX
bootTWIX
Examples
data(olives)
#Tree <- TWIX(Region~.,data=olives,topN=c(5,3),method="local")
#Tree1 <- bootTWIX(Region~.,data=olives,topN=c(3,1),N=10)
#pred <- bagg(Tree,olives,sq=1:10)
#pred1 <- bagg(Tree1,olives,sq=1:10)
#
#CCR's
#sum(pred==olives$Region)/nrow(olives)
#sum(pred1==olives$Region)/nrow(olives)
[Package
TWIX version 0.2.4
Index]