importance.plot | R Documentation |
Function that graphs the importance of the variables.
importance.plot(model, col = "steelblue")
model |
fitted model object. |
col |
the color of the chart bars. |
A ggplot object.
With this function we can identify how important the variables are for the generation of a predictive model.
ggplot
, train.adabag
, boosting
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)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.