Skip to contents

Simple wrapper for ranger::ranger(). Supports regression (default) and probability forests (set probability = TRUE).

Usage

mdl_ranger(y, X, ...)

Arguments

y

The outcome variable.

X

The feature matrix.

...

Additional arguments passed to ranger. See ranger::ranger() for a complete list of arguments.

Value

mdl_ranger returns an object of S3 class ranger as a simple mask of the return object of ranger::ranger().

References

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), 1-17.

See also

ranger::ranger()

Other ml_wrapper: mdl_glmnet(), mdl_glm(), mdl_xgboost(), ols()

Examples

ranger_fit <- mdl_ranger(rnorm(100), matrix(rnorm(1000), 100, 10))
class(ranger_fit)
#> [1] "mdl_ranger" "ranger"