plotImp: Create a barplot of relative variable importance scores.

Description Usage Arguments Examples

View source: R/variable_importance_plotting.R

Description

Given a named vector of variable importance measures, this function makes a barplot of the relative importances. The importances are scaled to sum to 1. An appropriate input is one column of the output from varImpY() or varImpCoeff().

Usage

1
plotImp(importance_vector, ...)

Arguments

importance_vector

a named vector where the names are the variables and the vector stores the importances.

...

additional arguments to plot, such as "main", "cex", etc.

Examples

1
2
imp <- varImpCoeff(forest)[,3]
plotImp(imp, main="Standardized Variable Importance")

Example output

Loading required package: rpart
Loading required package: nlme
Loading required package: splines
Registered S3 method overwritten by 'mosaic':
  method                           from   
  fortify.SpatialPolygonsDataFrame ggplot2
[1] "working on tree"
[1] 1
[1] 2
[1] 3
[1] 4
[1] 5
[1] 6
[1] 7
[1] 8
[1] 9
[1] 10

splinetree documentation built on July 18, 2019, 9:08 a.m.