R: Calculate a simple measure of 'importance' for each feature.

variable_importance {grf} | R Documentation

## Calculate a simple measure of 'importance' for each feature.

### Description

Calculate a simple measure of 'importance' for each feature.

### Usage

    variable_importance(forest, decay.exponent = 2, max.depth = 4)

### Arguments

`forest` | The trained forest.
`decay.exponent` | A tuning parameter that controls the importance of split depth.
`max.depth` | Maximum depth of splits to consider.

### Value

A list specifying an 'importance value' for each feature.

### Examples

    ## Not run:
    # Train a quantile forest.
    n = 50; p = 10
    X = matrix(rnorm(n*p), n, p)
    Y = X[,1] * rnorm(n)
    q.forest = quantile_forest(X, Y, quantiles=c(0.1, 0.5, 0.9))

    # Calculate the 'importance' of each feature.
    variable_importance(q.forest)

    ## End(Not run)

[Package grf version 0.10.2 Index]