# errorevol

0th

Percentile

##### Shows the error evolution of the ensemble

Calculates the error evolution of an AdaBoost.M1, AdaBoost-SAMME or Bagging classifier for a data frame as the ensemble size grows

Keywords
classif, tree
##### Usage
errorevol(object, newdata)
##### Arguments
object

This object must be the output of one of the functions bagging or boosting. This is assumed to be the result of some function that produces an object with two components named formula and trees, as those returned for instance by the bagging function.

newdata

Could be the same data frame used in object or a new one

##### Details

This can be useful to see how fast Bagging, boosting reduce the error of the ensemble. in addition, it can detect the presence of overfitting and, therefore, the convenience of pruning the ensemble using predict.bagging or predict.boosting.

##### Value

An object of class errorevol, which is a list with only one component:

error

a vector with the error evolution.

##### References

Alfaro, E., Gamez, M. and Garcia, N. (2013): adabag: An R Package for Classification with Boosting and Bagging''. Journal of Statistical Software, Vol 54, 2, pp. 1--35.

Alfaro, E., Garcia, N., Gamez, M. and Elizondo, D. (2008): Bankruptcy forecasting: An empirical comparison of AdaBoost and neural networks''. Decision Support Systems, 45, pp. 110--122.

Breiman, L. (1996): Bagging predictors''. Machine Learning, Vol 24, 2, pp.123--140.

Freund, Y. and Schapire, R.E. (1996): Experiments with a new boosting algorithm''. In Proceedings of the Thirteenth International Conference on Machine Learning, pp. 148--156, Morgan Kaufmann.

Zhu, J., Zou, H., Rosset, S. and Hastie, T. (2009): Multi-class AdaBoost''. Statistics and Its Interface, 2, pp. 349--360.

boosting, predict.boosting, bagging, predict.bagging

• errorevol
##### Examples
# NOT RUN {
library(mlbench)
data(BreastCancer)
l <- length(BreastCancer[,1])
sub <- sample(1:l,2*l/3)
cntrl <- rpart.control(maxdepth = 3, minsplit = 0,  cp = -1)