RLT

Reinforcement Learning Trees is an R package for random forest models with regression, classification, and survival analysis support. The package uses a C++/Rcpp backend with OpenMP for parallel computation.

Website | GitHub | Issues

Highlights

Installation

Install the released version from CRAN when available:

install.packages("RLT")

Install the development version from GitHub:

# install.packages("remotes")
# remotes::install_github("teazrq/RLT")
install.packages("RLT", repos = c('https://teazrq.r-universe.dev', 'https://cloud.r-project.org'))

On Windows, source installation requires Rtools. On macOS and Linux, source installation requires a working C++ toolchain and OpenMP support.

Quick Example

library(RLT)

set.seed(1)
n <- 200
p <- 6
x <- matrix(rnorm(n * p), n, p)
y <- x[, 1] - x[, 2] + rnorm(n)

fit <- RLT(
  x, y,
  model = "regression",
  ntrees = 100,
  importance = TRUE,
  verbose = FALSE
)

pred <- predict(fit, x[1:5, ])
pred$Prediction

importance(fit)

Documentation

The pkgdown site is built from the package vignettes and website-only articles:

References