This function extracts the variable importance of an SDTree. The variable importance is calculated as the sum of the decrease in the loss function resulting from all splits that use this covariate.

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

Arguments

object

an SDTree object

Value

A named vector of variable importance

Author

Markus Ulmer

Examples

data(iris)
tree <- SDTree(Sepal.Length ~ Sepal.Width + Petal.Length + Petal.Width, iris, cp = 0.5)
varImp(tree)
#>  Sepal.Width Petal.Length  Petal.Width 
#>            0            0            0