importanceplot {adabag}R Documentation

Plots the variables relative importance


Plots the relative importance of each variable in the classification task. This measure takes into account the gain of the Gini index given by a variable in a tree and, in the boosting case, the weight of this tree.


importanceplot(object, ...)



fitted model object of class boosting or bagging. This is assumed to be the result of some function that produces an object with a component named importance as that returned by the boosting and bagging functions.


further arguments passed to or from other methods.


For this goal, the varImp function of the caret package is used to get the gain of the Gini index of the variables in each tree.


A labeled plot is produced on the current graphics device (one being opened if needed).


Esteban Alfaro-Cortes, Matias Gamez-Martinez and Noelia Garcia-Rubio


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.

See Also

boosting, bagging,


#Iris example
sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25))
iris.adaboost <- boosting(Species ~ ., data=iris[sub,], mfinal=3)

#Examples with bagging
#iris.bagging <- bagging(Species ~ ., data=iris[sub,], mfinal=5)
#importanceplot(iris.bagging, horiz=TRUE, cex.names=.6)

[Package adabag version 5.0 Index]