Skip to content

forestError

1.1.0Package record

A Unified Framework for Random Forest Prediction Error Estimation

0packages depend
4Kdownloads / year
–test coverage
11/13flavors OK

Overview

About

Estimates the conditional error distributions of random forest predictions and common parameters of those distributions, including conditional misclassification rates, conditional mean squared prediction errors, conditional biases, and conditional quantiles, by out-of-bag weighting of out-of-bag prediction errors as proposed by Lu and Hardin (2021). This package is compatible with several existing packages that implement random forests in R.

Changes in 1.1.0

Version 1.1.0 makes two changes. First, it enables estimation of the conditional misclassification rate of predictions by classification random forests as proposed by Lu and Hardin (2021). Second, it compartmentalizes a costly step in the quantForestError algorithm: The identification of each training observation's out-of-bag terminal nodes.

Conditional Misclassification Rate Estimation

The conditional misclassification rate of predictions by classification random forests can now be estimated. To estimate it, simply set the what argument in the quantForestError function to "mcr". what will default to this if the provided forest is a classification random forest. See the example code in the README for a toy demonstration of the performance of this estimator.

Compartmentalization

The identification of each training observation's out-of-bag terminal nodes is now compartmentalized from the main quantForestError function. By isolating this step from the main quantForestError function, Version 1.1.0 allows users to more efficiently iterate the algorithm. Users may wish to feed quantForestError batches of test observations iteratively if they have streaming data or a large test set that cannot be processed in one go due to memory constraints. In previous versions of this package, doing so would require the algorithm to recompute each training observation's out-of-bag terminal nodes in each iteration. This was redundant and costly. By separating this computation from the rest of the quantForestError algorithm, Version 1.1.0 allows the user to perform this computation only once.

As part of this modularization, the quantForestError function now has two additional arguments. If set to TRUE, return_train_nodes will return a data.table identifying each training observation's out-of-bag terminal nodes. This data.table can then be fed back into quantForestError via the argument train_nodes to avoid the redundant recomputation.

Version 1.1.0 also exports the function that produces the data.table identifying each training observation's out-of-bag terminal nodes. It is called findOOBErrors. Assuming the same inputs, findOOBErrors will produce the same output that is returned by setting return_train_nodes to TRUE in the quantForestError function.

See the documentation on quantForestError and findOOBErrors for examples.

Neither of these changes affects code that relied on Version 1.0.0 of this package, as the changes consist solely of a newly exported function, two optional arguments to quantForestError that by default do nothing new, and a new possible input for the what argument.

From NEWS.md in the release

Install

Health

CRAN checks
2NOTE11OK
Check messages
NOTECRAN incoming feasibilityr-devel-linux-x86_64-debian-clang, r-devel-linux-x86_64-debian-gcc
Maintainer: ‘Benjamin Lu <b.lu@berkeley.edu>’

No Authors@R field in DESCRIPTION.
Please add one, modifying
  Authors@R: c(person(given = "Benjamin",
                      family = "Lu",
                      role = c("aut", "cre"),
                      email = "b.lu@berkeley.edu"),
               person(given = "Johanna",
                      family = "Hardin",
                      role = "aut"))
as necessary.

Package CITATION file contains call(s) to old-style personList() or
as.personList().  Please use c() on person objects instead.
Package CITATION file contains call(s) to old-style citEntry().  Please
use bibentry() instead.

CRAN check page ↗

Slowest check: 1.0 min · r-release-windows-x86_64
Status changes
  • NOTE11 OK, 2 NOTE2026-05-10
  • WARNING11 OK, 1 NOTE, 1 WARNING2026-05-09
  • NOTE12 OK, 2 NOTE2026-03-10
Advisories

none known

Documentation

In release 1.1.0
READMEYes · 581 wordsVignettesNoNEWSYes · 67% structured · mentions 1.1.0Citation fileYes · cites a publicationWebsitenot declared in DESCRIPTION
Help pages
6 (2 internal)
Examples that run
100%4 run in a plain check
Exported functions with examples
100%
Documented parameters
77%
Return-value docs
100%
Help pages citing references
0%

Downloads

4K
CRAN downloads in the past year
Rank #11,433 · ~11/day · ~336/mo
Daily download trend is not available in this view yet.
34830 days
93090 days
4K1 year
Compare downloads with other packages →
Also on71 r2u3 autocran54 c2d4u

Dependencies

Declared dependencies
3 external dependencies (excludes base and recommended)

Installing forestError adds 8 packages (7 with compiled code, 8.8 MB of source tarballs). Heaviest: data.table 5.7 MB, vctrs 1.0 MB, rlang 766 KB.

Depends (0)
none
Imports (2)
LinkingTo (0)
none
Suggests (1)
Enhances (0)
none
Reverse dependencies
0direct
0indirect

Nothing depends on this yet.

People & History

People (from the free-text Author field) (2)

Maintainer since 0.1.0 (2020)

Releases (5)

Pick two releases to compare their code metrics.

  • R
    R 4.6.0 released · 2026-04-24
  • R
    R 4.5.0 released · 2025-04-11
  • R
    R 4.4.0 released · 2024-04-24
  • R
    R 4.3.0 released · 2023-04-21
  • R
    R 4.2.0 released · 2022-04-22
  • 1.1.0Latest
    record
    2021-08-10 · current release · diff ↗ ·
    added 1 export
    findOOBErrors
  • R
    R 4.1.0 released · 2021-05-18
  • 1.0.0
    record
    2021-02-11 · diff ↗
  • R
    R 4.0.0 released · 2020-04-24
  • 0.2.0
    record
    2020-04-02 · diff ↗
  • 0.1.1
    record
    2020-01-31 · diff ↗
  • 0.1.0
    record
    2020-01-14
  • R
    R 3.6.0 released · 2019-04-26

Package metadata

First published
2020-01-14
Total releases
5 / 6 yrs
License
GPL-3 OSI
Download size
14 KB

Cite

Cite this package

Run in R for the authors' entry:

citation("forestError")

The package provides a citation file, so citation() returns the authors' own entry.

Cite the R Observatory

For a number measured here: a download total, a coverage figure, an archival date.

APA

Balamuta, J. J. (2026). R Observatory: Metrics for forestError version 1.1.0 [Data set]. HJJB, LLC. Data release v2026-10-20. https://doi.org/10.5281/zenodo.21843040

From data release v2026-10-20, which the citation names so these numbers can be found later. More on citing and the projects behind them.

Report a problem with this page →

Privacy choices

These apply to this browser and are stored on this device only. Nothing about your choice is sent to us.

Read the privacy policy