importance.plot {traineR} | R Documentation |
importance.plot
Description
Function that graphs the importance of the variables.
Usage
importance.plot(model, col = "steelblue")
Arguments
model |
fitted model object. |
col |
the color of the chart bars. |
Value
A ggplot object.
Note
With this function we can identify how important the variables are for the generation of a predictive model.
See Also
ggplot
, train.adabag
, boosting
Examples
data <- iris
n <- nrow(data)
sam <- sample(1:n,n*0.75)
training <- data[sam,]
testing <- data[-sam,]
model <- train.adabag(formula = Species~.,data = training,minsplit = 2,
maxdepth = 30, mfinal = 10)
importance.plot(model)
[Package traineR version 2.2.0 Index]