# importanceplot

0th

Percentile

##### 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.

Keywords
classif, tree
##### Usage
importanceplot(object, ...)
##### Arguments
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.

##### Details

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.

##### Value

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

##### 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, bagging,

##### Aliases
• importanceplot
##### Examples
# NOT RUN {
#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)