Regression-Enhanced Random Forests

A novel generalized Random Forest method, that can improve on RFs by borrowing the strength of penalized parametric regression. Based on Zhang et al. (2019) .


RegEnRF

R-CMD-check

RegEnRF is the implementation of the Regression-Enhanced Random Forests algorithm as described in Zhang et al. (2019).

Installation

You can install RegEnRF like so:

install.packages("RegEnRF")

or the development version like so:

devtools::install_github("umbe1987/regenrf")

Example

This is an example showing how to perform Regression-Enhanced Random Forests with RegEnRF. It demonstrates how RegEnRF can extrapolate beyond the training domain, as opposed to randomForest.

library(RegEnRF)

set.seed(111)
data(co2)
x <- matrix(c(time(co2), cycle(co2)), ncol = 2)
y <- as.numeric(co2)
mod <- RegEnRF(x, y, lambda = 0.1)
#> Warning in rfout$mse/(var(y) * (n - 1)/n): Recycling array of length 1 in vector-array arithmetic is deprecated.
#>   Use c() or as.vector() instead.
freq <- frequency(co2)
startt <- tsp(co2)[2] + 1 / freq
xnew.t <- seq(startt, by = 1 / freq, length.out = freq * 3)
xnew <- matrix(c(xnew.t, cycle(tail(co2, freq * 3))), ncol = 2)
pred <- predict(mod, xnew)
pred.ts <- ts(pred, start = startt, frequency = freq)
plot(ts.union(co2, pred.ts), plot.type = "single", col = c("black", "red"))

Reference manual

It appears you don't have a PDF plugin for this browser. You can click here to download the reference manual.

install.packages("RegEnRF")

2.0.1 by Umberto Minora, 2 months ago


https://github.com/umbe1987/RegEnRF


Report a bug at https://github.com/umbe1987/RegEnRF/issues


Browse source code at https://github.com/cran/RegEnRF


Authors: Umberto Minora [aut, cre, cph] (ORCID:


Documentation:   PDF Manual  


MIT + file LICENSE license


Imports glmnet, randomForest

Suggests testthat


See at CRAN