@misc{grf,
title = {grf},
author = {Athey and Tibshirani and Wager},
howpublished = {\url{https://grf-labs.github.io/grf/}},
note = {Software / documentation}
}Random forest with a local linear correction — smoother fits and better extrapolation for smooth signals.
v2.6.1tag

Figure: GRF package logo. Source — grf-labs docs.
⚠️ Unofficial community write-up of a method from grf-labs/grf (pinned at
v2.6.1). Not affiliated with the grf-labs authors — this summarizes the public documentation for demonstration. All credit & copyright belong to the original authors (Athey, Tibshirani, Wager, et al.).
What it does
Uses the forest only to define a kernel (the adaptive weights), then fits a local linear regression at the test point. This corrects the boundary bias and 'staircase' artifacts of plain forests when the true signal is smooth.
llf <- ll_regression_forest(X, Y)
predict(llf, X.test, linear.correction.variables = 1:ncol(X))
Use it for
Smooth conditional means, extrapolation near the edges of the covariate space.
Used in these workflows (1)
-
Smooth signals with a local linear forest
When the conditional mean is smooth: regression forest baseline → ll_regression_forest → tuning → diagnostics.
Local linear correction fixes the staircase artifacts beautifully on smooth signals. My go-to when plain forests look blocky.