varImp.SDForest: Extract variable importance of an SDForest

View source: R/varImp.R

varImp.SDForestR Documentation

Extract variable importance of an SDForest

Description

This function extracts the variable importance of an SDForest. The variable importance is calculated as the sum of the decrease in the loss function resulting from all splits that use a covariate for each tree. The mean of the variable importance of all trees results in the variable importance for the forest.

Usage

## S3 method for class 'SDForest'
varImp(object)

Arguments

object

an SDForest object

Value

A named vector of variable importance

Author(s)

Markus Ulmer

See Also

varImp.SDTree SDForest

Examples

data(iris)
fit <- SDForest(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, 
                 iris, nTree = 10, cp = 0.5)
varImp(fit)

SDModels documentation built on April 11, 2025, 5:50 p.m.