importance.plot: importance.plot

View source: R/variables.R

importance.plotR 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)


traineR documentation built on Nov. 10, 2023, 1:15 a.m.