hshrink: Hierarchical shrinkage

View source: R/hshrink.R

hshrinkR Documentation

Hierarchical shrinkage

Description

Apply hierarchical shrinkage to a ranger object. Hierarchical shrinkage is a regularization technique that recursively shrinks node predictions towards parent node predictions. For details see Agarwal et al. (2022).

Usage

hshrink(rf, lambda)

Arguments

rf

ranger object, created with node.stats = TRUE.

lambda

Non-negative shrinkage parameter.

Value

The ranger object is modified in-place.

Author(s)

Marvin N. Wright

References

  • Agarwal, A., Tan, Y.S., Ronen, O., Singh, C. & Yu, B. (2022). Hierarchical Shrinkage: Improving the accuracy and interpretability of tree-based models. Proceedings of the 39th International Conference on Machine Learning, PMLR 162:111-135.

Examples

## Hierarchical shrinkage for a probablity forest
rf <- ranger(Species ~ ., iris, node.stats = TRUE, probability = TRUE)
hshrink(rf, lambda = 5)

ranger documentation built on April 4, 2025, 6:12 a.m.

Related to hshrink in ranger...