adabag-package: Applies Multiclass AdaBoost.M1, SAMME and Bagging

Description Details Author(s) References See Also Examples

Description

It implements Freund and Schapire's Adaboost.M1 algorithm and Breiman's Bagging algorithm using classification trees as individual classifiers. Once these classifiers have been trained, they can be used to predict on new data. Also, cross validation estimation of the error can be done. Since version 2.0 the function margins() is available to calculate the margins for these classifiers. Also a higher flexibility is achieved giving access to the rpart.control() argument of 'rpart'. Four important new features were introduced on version 3.0, AdaBoost-SAMME (Zhu et al., 2009) is implemented and a new function errorevol() shows the error of the ensembles as a function of the number of iterations. In addition, the ensembles can be pruned using the option 'newmfinal' in the predict.bagging() and predict.boosting() functions and the posterior probability of each class for observations can be obtained. Version 3.1 modifies the relative importance measure to take into account the gain of the Gini index given by a variable in each tree and the weights of these trees. Version 4.0 includes the margin-based ordered aggregation for Bagging pruning (Guo and Boukir, 2013) and a function to auto prune the 'rpart' tree. Moreover, three new plots are also available importanceplot(), plot.errorevol() and plot.margins(). Version 4.1 allows to predict on unlabeled data.

Details

Package: adabag
Type: Package
Version: 4.1
Date: 2015-10-14
License: GPL(>= 2)
LazyLoad: yes

Author(s)

Author: Esteban Alfaro-Cortes, Matias Gamez-Martinez and Noelia Garcia-Rubio,
with contributions from Li Guo
Maintainer: Esteban Alfaro-Cortes <[email protected]>

References

Alfaro, E., Gamez, M. and Garcia, N. (2013): “adabag: An R Package for Classification with Boosting and Bagging”. Journal of Statistical Software, 54(2), 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, 110–122.

Breiman, L. (1998): “Arcing classifiers”. The Annals of Statistics, 26(3), 801–849.

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

Guo, L. and Boukir, S. (2013): "Margin-based ordered aggregation for ensemble pruning". Pattern Recognition Letters, 34(6), 603-609.

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

Reverse cites

To the best of our knowledge this package has been cited by:

Andriyas, S. and McKee, M. (2013). Recursive partitioning techniques for modeling irrigation behavior. Environmental Modelling & Software, 47, 207–217.

Chan, J. C. W. and Paelinckx, D. (2008). Evaluation of Random Forest and Adaboost tree-based ensemble classification and spectral band selection for ecotope mapping using airborne hyperspectral imagery. Remote Sensing of Environment, 112(6), 2999–3011.

Chrzanowska, M., Alfaro, E., and Witkowska, D. (2009). The individual borrowers recognition: Single and ensemble trees. Expert Systems with Applications, 36(2), 6409–6414.

De Bock, K. W., Coussement, K., and Van den Poel, D. (2010). Ensemble classification based on generalized additive models. Computational Statistics & Data Analysis, 54(6), 1535–1546.

De Bock, K. W. and Van den Poel, D. (2011). An empirical evaluation of rotation-based ensemble classifiers for customer churn prediction. Expert Systems with Applications, 38(10), 12293–12301.

Fan, Y., Murphy, T.B., William, R. and Watson G. (2009). digeR: GUI tool for analyzing 2D DIGE data. R package version 1.2.

Garcia-Perez-de-Lema, D., Alfaro-Cortes, E., Manzaneque-Lizano, M. and Banegas-Ochovo, R. (2012). Strategy, competitive factors and performance in small and medium enterprise (SMEs). African Journal of Business Management, 6(26), 7714–7726.

Gonzalez-Rufino, E., Carrion, P., Cernadas, E., Fernandez-Delgado, M. and Dominguez-Petit, R. (2013). Exhaustive comparison of colour texture features and classification methods to discriminate cells categories in histological images of fish ovary. Pattern Recognition, 46, 2391–2407.

Krempl, G. and Hofer, V. (2008). Partitioner trees: combining boosting and arbitrating. In: Okun, O., Valentini, G. (eds.) Proc. 2nd Workshop Supervised and Unsupervised Ensemble Methods and Their Applications, Patras, Greece, 61–66.

Maindonald, J. and Braun, J. (2010). Data Analysis and Graphics Using R - An Example-Based Approach. 3rd ed, Cambridge University Press (p. 373)

Murphy, T. B., Dean, N. and Raftery, A. E. (2010). Variable selection and updating in model-based discriminant analysis for high dimensional data with food authenticity applications. The annals of applied statistics, 4(1), 396–421.

Stewart, B.M. and Zhukov, Y.M. (2009). Use of force and civil-military relations in Russia: An automated content analysis. Small Wars & Insurgencies, 20(2), 319–343.

Torgo, L. (2010). Data Mining with R: Learning with Case Studies. Series: Chapman & Hall/CRC Data Mining and Knowledge Discovery.

If you know any other work where this package is cited, please send us an email

See Also

autoprune, bagging, bagging.cv, boosting, boosting.cv, errorevol, importanceplot, margins, MarginOrderedPruning.Bagging, plot.errorevol, plot.margins, predict.bagging, predict.boosting

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
## rpart library should be loaded
data(iris)
iris.adaboost <- boosting(Species~., data=iris, boos=TRUE, 
	mfinal=3)
importanceplot(iris.adaboost)

sub <- c(sample(1:50, 35), sample(51:100, 35), sample(101:150, 35))
iris.bagging <- bagging(Species ~ ., data=iris[sub,], mfinal=3)
#Predicting with labeled data
iris.predbagging<-predict.bagging(iris.bagging, newdata=iris[-sub,])
iris.predbagging
#Predicting with unlabeled data
iris.predbagging<- predict.bagging(iris.bagging, newdata=iris[-sub,-5])
iris.predbagging

Example output

Loading required package: rpart
Loading required package: mlbench
Loading required package: caret
Loading required package: lattice
Loading required package: ggplot2
$formula
Species ~ .

$votes
      [,1] [,2] [,3]
 [1,]    3    0    0
 [2,]    3    0    0
 [3,]    3    0    0
 [4,]    3    0    0
 [5,]    3    0    0
 [6,]    3    0    0
 [7,]    3    0    0
 [8,]    3    0    0
 [9,]    3    0    0
[10,]    3    0    0
[11,]    3    0    0
[12,]    3    0    0
[13,]    3    0    0
[14,]    3    0    0
[15,]    3    0    0
[16,]    0    3    0
[17,]    0    1    2
[18,]    0    3    0
[19,]    0    3    0
[20,]    0    3    0
[21,]    0    3    0
[22,]    0    0    3
[23,]    0    3    0
[24,]    0    1    2
[25,]    0    3    0
[26,]    0    3    0
[27,]    0    3    0
[28,]    0    3    0
[29,]    0    3    0
[30,]    0    3    0
[31,]    0    0    3
[32,]    0    2    1
[33,]    0    0    3
[34,]    0    0    3
[35,]    0    0    3
[36,]    0    0    3
[37,]    0    1    2
[38,]    0    0    3
[39,]    0    0    3
[40,]    0    0    3
[41,]    0    0    3
[42,]    0    0    3
[43,]    0    0    3
[44,]    0    0    3
[45,]    0    0    3

$prob
      [,1]      [,2]      [,3]
 [1,]    1 0.0000000 0.0000000
 [2,]    1 0.0000000 0.0000000
 [3,]    1 0.0000000 0.0000000
 [4,]    1 0.0000000 0.0000000
 [5,]    1 0.0000000 0.0000000
 [6,]    1 0.0000000 0.0000000
 [7,]    1 0.0000000 0.0000000
 [8,]    1 0.0000000 0.0000000
 [9,]    1 0.0000000 0.0000000
[10,]    1 0.0000000 0.0000000
[11,]    1 0.0000000 0.0000000
[12,]    1 0.0000000 0.0000000
[13,]    1 0.0000000 0.0000000
[14,]    1 0.0000000 0.0000000
[15,]    1 0.0000000 0.0000000
[16,]    0 1.0000000 0.0000000
[17,]    0 0.3333333 0.6666667
[18,]    0 1.0000000 0.0000000
[19,]    0 1.0000000 0.0000000
[20,]    0 1.0000000 0.0000000
[21,]    0 1.0000000 0.0000000
[22,]    0 0.0000000 1.0000000
[23,]    0 1.0000000 0.0000000
[24,]    0 0.3333333 0.6666667
[25,]    0 1.0000000 0.0000000
[26,]    0 1.0000000 0.0000000
[27,]    0 1.0000000 0.0000000
[28,]    0 1.0000000 0.0000000
[29,]    0 1.0000000 0.0000000
[30,]    0 1.0000000 0.0000000
[31,]    0 0.0000000 1.0000000
[32,]    0 0.6666667 0.3333333
[33,]    0 0.0000000 1.0000000
[34,]    0 0.0000000 1.0000000
[35,]    0 0.0000000 1.0000000
[36,]    0 0.0000000 1.0000000
[37,]    0 0.3333333 0.6666667
[38,]    0 0.0000000 1.0000000
[39,]    0 0.0000000 1.0000000
[40,]    0 0.0000000 1.0000000
[41,]    0 0.0000000 1.0000000
[42,]    0 0.0000000 1.0000000
[43,]    0 0.0000000 1.0000000
[44,]    0 0.0000000 1.0000000
[45,]    0 0.0000000 1.0000000

$class
 [1] "setosa"     "setosa"     "setosa"     "setosa"     "setosa"    
 [6] "setosa"     "setosa"     "setosa"     "setosa"     "setosa"    
[11] "setosa"     "setosa"     "setosa"     "setosa"     "setosa"    
[16] "versicolor" "virginica"  "versicolor" "versicolor" "versicolor"
[21] "versicolor" "virginica"  "versicolor" "virginica"  "versicolor"
[26] "versicolor" "versicolor" "versicolor" "versicolor" "versicolor"
[31] "virginica"  "versicolor" "virginica"  "virginica"  "virginica" 
[36] "virginica"  "virginica"  "virginica"  "virginica"  "virginica" 
[41] "virginica"  "virginica"  "virginica"  "virginica"  "virginica" 

$confusion
               Observed Class
Predicted Class setosa versicolor virginica
     setosa         15          0         0
     versicolor      0         12         1
     virginica       0          3        14

$error
[1] 0.08888889

$formula
Species ~ .

$votes
      [,1] [,2] [,3]
 [1,]    3    0    0
 [2,]    3    0    0
 [3,]    3    0    0
 [4,]    3    0    0
 [5,]    3    0    0
 [6,]    3    0    0
 [7,]    3    0    0
 [8,]    3    0    0
 [9,]    3    0    0
[10,]    3    0    0
[11,]    3    0    0
[12,]    3    0    0
[13,]    3    0    0
[14,]    3    0    0
[15,]    3    0    0
[16,]    0    3    0
[17,]    0    1    2
[18,]    0    3    0
[19,]    0    3    0
[20,]    0    3    0
[21,]    0    3    0
[22,]    0    0    3
[23,]    0    3    0
[24,]    0    1    2
[25,]    0    3    0
[26,]    0    3    0
[27,]    0    3    0
[28,]    0    3    0
[29,]    0    3    0
[30,]    0    3    0
[31,]    0    0    3
[32,]    0    2    1
[33,]    0    0    3
[34,]    0    0    3
[35,]    0    0    3
[36,]    0    0    3
[37,]    0    1    2
[38,]    0    0    3
[39,]    0    0    3
[40,]    0    0    3
[41,]    0    0    3
[42,]    0    0    3
[43,]    0    0    3
[44,]    0    0    3
[45,]    0    0    3

$prob
      [,1]      [,2]      [,3]
 [1,]    1 0.0000000 0.0000000
 [2,]    1 0.0000000 0.0000000
 [3,]    1 0.0000000 0.0000000
 [4,]    1 0.0000000 0.0000000
 [5,]    1 0.0000000 0.0000000
 [6,]    1 0.0000000 0.0000000
 [7,]    1 0.0000000 0.0000000
 [8,]    1 0.0000000 0.0000000
 [9,]    1 0.0000000 0.0000000
[10,]    1 0.0000000 0.0000000
[11,]    1 0.0000000 0.0000000
[12,]    1 0.0000000 0.0000000
[13,]    1 0.0000000 0.0000000
[14,]    1 0.0000000 0.0000000
[15,]    1 0.0000000 0.0000000
[16,]    0 1.0000000 0.0000000
[17,]    0 0.3333333 0.6666667
[18,]    0 1.0000000 0.0000000
[19,]    0 1.0000000 0.0000000
[20,]    0 1.0000000 0.0000000
[21,]    0 1.0000000 0.0000000
[22,]    0 0.0000000 1.0000000
[23,]    0 1.0000000 0.0000000
[24,]    0 0.3333333 0.6666667
[25,]    0 1.0000000 0.0000000
[26,]    0 1.0000000 0.0000000
[27,]    0 1.0000000 0.0000000
[28,]    0 1.0000000 0.0000000
[29,]    0 1.0000000 0.0000000
[30,]    0 1.0000000 0.0000000
[31,]    0 0.0000000 1.0000000
[32,]    0 0.6666667 0.3333333
[33,]    0 0.0000000 1.0000000
[34,]    0 0.0000000 1.0000000
[35,]    0 0.0000000 1.0000000
[36,]    0 0.0000000 1.0000000
[37,]    0 0.3333333 0.6666667
[38,]    0 0.0000000 1.0000000
[39,]    0 0.0000000 1.0000000
[40,]    0 0.0000000 1.0000000
[41,]    0 0.0000000 1.0000000
[42,]    0 0.0000000 1.0000000
[43,]    0 0.0000000 1.0000000
[44,]    0 0.0000000 1.0000000
[45,]    0 0.0000000 1.0000000

$class
 [1] "setosa"     "setosa"     "setosa"     "setosa"     "setosa"    
 [6] "setosa"     "setosa"     "setosa"     "setosa"     "setosa"    
[11] "setosa"     "setosa"     "setosa"     "setosa"     "setosa"    
[16] "versicolor" "virginica"  "versicolor" "versicolor" "versicolor"
[21] "versicolor" "virginica"  "versicolor" "virginica"  "versicolor"
[26] "versicolor" "versicolor" "versicolor" "versicolor" "versicolor"
[31] "virginica"  "versicolor" "virginica"  "virginica"  "virginica" 
[36] "virginica"  "virginica"  "virginica"  "virginica"  "virginica" 
[41] "virginica"  "virginica"  "virginica"  "virginica"  "virginica" 

$confusion
NULL

$error
NULL

adabag documentation built on Jan. 20, 2018, 9:04 a.m.