plot.VarImp | R Documentation |
Dotchart of variable importance as measured by an Oblique Decision Random Forest.
## S3 method for class 'VarImp'
plot(x, nvar = min(30, nrow(x$varImp)), digits = NULL, main = NULL, ...)
x |
An object of class |
nvar |
number of variables to show. |
digits |
Integer indicating the number of decimal places (round) or significant digits (signif) to be used. |
main |
plot title. |
... |
Arguments to be passed to methods. |
The horizontal axis is the increased error of ODRF after replacing the variable, the larger the increased error the more important the variable is.
ODRF
VarImp
data(breast_cancer)
set.seed(221212)
train <- sample(1:569, 200)
train_data <- data.frame(breast_cancer[train, -1])
forest <- ODRF(train_data[, -1], train_data[, 1], split = "gini",
parallel = FALSE)
varimp <- VarImp(forest, train_data[, -1], train_data[, 1])
plot(varimp)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.