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.
fitted model object of class
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).
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.
1 2 3 4 5 6 7 8 9 10 11
#Examples #Iris example library(rpart) data(iris) sub <- c(sample(1:50, 25), sample(51:100, 25), sample(101:150, 25)) iris.adaboost <- boosting(Species ~ ., data=iris[sub,], mfinal=3) importanceplot(iris.adaboost) #Examples with bagging #iris.bagging <- bagging(Species ~ ., data=iris[sub,], mfinal=5) #importanceplot(iris.bagging, horiz=TRUE, cex.names=.6)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.