Learn R Programming

randomForestCI

 This package is deprecated. Please use one of the following packages instead: 

  • grf, which has built-in support for resampling-based confidence intervals, or
  • ranger, which has an actively maintained version of the infinitesimal jackknife for random forests.

 Both packages are available from CRAN. 

Confidence intervals for random forests using the infinitesimal jackknife, as developed by Efron (2014) and Wager et al. (2014).

To install this package in R, run the following commands:

install.packages("devtools")
library(devtools) 
install_github("swager/randomForestCI")

Example usage:

library(randomForestCI)

# Make some data...
n = 250
p = 100
X = matrix(rnorm(n * p), n, p)
Y = rnorm(n)
  
#  Run the method
rf = randomForest(X, Y, keep.inbag = TRUE)
ij = randomForestInfJack(rf, X, calibrate = TRUE)

plot(ij)

References

Efron, Bradley. Estimation and accuracy after model selection. Journal of the American Statistical Association, 109(507), 2014. [link]

Wager, Stefan, Trevor Hastie, and Bradley Efron. Confidence intervals for random forests: The jackknife and the infinitesimal jackknife. The Journal of Machine Learning Research, 15(1), 2014. [link]

Copy Link

Version

Version

1.0.0

License

What license is it under?

Maintainer

Stefan Wager

Last Published

December 18th, 2017

Functions in randomForestCI (1.0.0)

gbayes

Bayes posterior estimation with Gaussian noise
infJack

The infinitesimal jackknife for random forests
randomForestInfJack

The infinitesimal jackknife for random forests
calibrateEB

Empirical Bayes calibration of noisy variance estimates
gfit

Fit an empirical Bayes prior in the hierarchical model mu ~ G, X ~ N(mu, sigma^2)
randomForestInfJackMulticlass

The infinitesimal jackknife for random forests (multiclass target variable)