hshrink | R Documentation |
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).
hshrink(rf, lambda)
rf |
ranger object, created with |
lambda |
Non-negative shrinkage parameter. |
The ranger object is modified in-place.
Marvin N. Wright
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.
## Hierarchical shrinkage for a probablity forest
rf <- ranger(Species ~ ., iris, node.stats = TRUE, probability = TRUE)
hshrink(rf, lambda = 5)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.