Learn R Programming

traineR (version 2.2.11)

importance.plot: importance.plot

Description

Function that graphs the importance of the variables.

Usage

importance.plot(model, col = "steelblue")

Value

A ggplot object.

Arguments

model

fitted model object.

col

the color of the chart bars.

See Also

ggplot, train.adabag, boosting

Examples

Run this code

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)

Run the code above in your browser using DataLab