YARF—Yet Another Random Forests package—is a customizable, asynchronous, and parallelized random-forest implementation for R. Its extension points allow researchers to define splitting and aggregation behavior in JavaScript while retaining an R interface.
The repository contains the R package in YARF/ and its bundled Java
dependency in YARFJARs/.
- Classification and regression forests with out-of-bag diagnostics
- Custom JavaScript split rules and aggregation functions
- Missingness incorporated in attributes (MIA)
- Random-forest-based missing-value imputation
- Asynchronous and parallel tree construction
- Variable-importance, interaction, proximity, and tree-inspection tools
YARF is distributed through the kapelner R-universe, not CRAN. Install it and its companion package with:
install.packages(
"YARF",
repos = c(
kapelner = "https://kapelner.r-universe.dev",
CRAN = "https://cloud.r-project.org"
)
)Java 8 or newer is required. To install the development checkout directly:
install.packages("remotes")
remotes::install_github("kapelner/YARF", subdir = "YARFJARs")
remotes::install_github("kapelner/YARF", subdir = "YARF")library(YARF)
fit <- YARF(
X = iris[, 1:4],
y = iris$Species,
num_trees = 100
)
predict(fit, iris[, 1:4])See the package website for the getting-started guide and function reference, or visit the R-universe package page for builds and binaries.
Run citation("YARF") for citation details. YARF is maintained by Adam Kapelner
with contributions from Matt Olson and Abhinav Patil and is released under the
GNU General Public License version 3.
