Learn R Programming

unityForest (version 0.1.0)

unityForest-package: Unity Forest (UFO) Framework

Description

This package implements the unity forest (UFO) framework. UFOs are a random forest variant designed to better take covariates with purely interaction-based effects into account, including interactions for which none of the involved covariates exhibits a marginal effect. While this framework tends to improve discrimination and predictive accuracy compared to standard random forests, it also facilitates the identification and interpretation of (marginal or interactive) effects: In addition to the UFO algorithm for tree construction, the package includes the unity variable importance measure (unity VIM), which quantifies covariate effects under the conditions in which they are strongest - either marginally or within subgroups defined by interactions - as well as covariate-representative tree roots (CRTRs) that provide interpretable visualizations of these conditions. Currently, only classification is supported.

Arguments

Details

The main functions of the package are:

  • unityfor: Construct a UFO and compute the unity VIM.

  • predict.unityfor: Predict using a UFO fitted using unityfor.

  • reprTrees: Select and visualize covariate-representative tree roots (CRTRs) based on a unityfor object.

This package is a fork of the R package 'ranger' that implements random forests using an efficient C++ implementation. The documentation is partly taken from 'ranger', where some parts of the documentation may not apply to (the current version of) the 'unityForest' package.

The code in the example sections can be used as a template for basic application scenarios.

References

  • Hornung, R., Hapfelmeier, A. (2026). Unity Forests: Improving Interaction Modelling and Interpretability in Random Forests. arXiv:2601.07003, <tools:::Rd_expr_doi("10.48550/arXiv.2601.07003")>.

  • Wright, M. N., Ziegler, A. (2017). ranger: A fast implementation of random forests for high dimensional data in C++ and R. Journal of Statistical Software 77:1-17, <tools:::Rd_expr_doi("10.18637/jss.v077.i01")>.

  • Breiman, L. (2001). Random forests. Machine Learning 45:5-32, <tools:::Rd_expr_doi("10.1023/A:1010933404324")>.

  • Malley, J. D., Kruppa, J., Dasgupta, A., Malley, K. G., & Ziegler, A. (2012). Probability machines: consistent probability estimation using nonparametric learning machines. Methods of Information in Medicine 51:74-81, <tools:::Rd_expr_doi("10.3414/ME00-01-0052")>.