Learn R Programming

SCE (version 1.1.0)

importance: Variable Importance Analysis

Description

Functions for calculating variable importance scores using Wilks' Lambda method. The package provides both generic S3 methods and direct function calls for importance analysis.

Usage

importance(object, ...)

# S3 method for SCA importance(object, ...)

# S3 method for SCE importance(object, OOB_weight = TRUE, ...)

Wilks_importance(model, OOB_weight = TRUE)

SCA_importance(model)

Value

A data.frame containing:

  • Predictor: Names of the predictors

  • Relative_Importance: Normalized importance scores (sum to 1)

Arguments

object

An object for which importance scores should be calculated.

model

A trained model object:

  • For Wilks_importance: SCE model object (S3 class "SCE") containing a list of SCA trees

  • For SCA_importance: Single SCA tree object (S3 class "SCA")

OOB_weight

Logical indicating whether to use out-of-bag weighting for importance calculation. Default is TRUE. Only used for SCE objects and Wilks_importance.

...

Additional arguments passed to methods.

Author

Kailong Li <lkl98509509@gmail.com>

Details

Importance Calculation Method:

All functions use the Wilks' Lambda statistic to calculate variable importance:

  1. Extract Wilks' Lambda values and split information from tree(s)

  2. Replace negative Wilks' Lambda values with zero

  3. Calculate raw importance for each split:

    • Importance = (left_samples + right_samples) / total_samples * (1 - Wilks' Lambda)

  4. Aggregate importance scores by predictor

  5. Normalize importance scores to sum to 1

Function Differences:

  • importance.SCA(): S3 method for single SCA trees

  • importance.SCE(): S3 method for SCE ensembles (calls Wilks_importance)

  • Wilks_importance(): Direct function for SCE ensembles with OOB weighting options

  • SCA_importance(): Direct function for single SCA trees

OOB Weighting:

  • If OOB_weight = TRUE: Importance scores are weighted by each tree's OOB performance

  • If OOB_weight = FALSE: Importance scores are calculated using the median across trees

References

Li, Kailong, Guohe Huang, and Brian Baetz. "Development of a Wilks feature importance method with improved variable rankings for supporting hydrological inference and modelling." Hydrology and Earth System Sciences 25.9 (2021): 4947-4966.

See Also

SCA, SCE