estimateErrorParams: Estimate prediction error distribution parameters

Description Usage Arguments Details Value Author(s) See Also

View source: R/estimateerrorparams.R

Description

Estimates the prediction error distribution parameters requested in the input to quantForestError.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
estimateErrorParams(
  train_nodes,
  test_nodes,
  mspewhat,
  biaswhat,
  intervalwhat,
  pwhat,
  qwhat,
  mcrwhat,
  alpha,
  n.test
)

Arguments

train_nodes

A data.table indicating which out-of-bag prediction errors are in each terminal node of each tree in the random forest. It must be formatted like the output of the findOOBErrors function.

test_nodes

A data.table indicating which test observations are in each terminal node of each tree in the random forest. It must be formatted like the output of the findTestPreds function.

mspewhat

A boolean indicating whether to estimate conditional MSPE.

biaswhat

A boolean indicating whether to estimate conditional bias.

intervalwhat

A boolean indicating whether to estimate conditional prediction intervals.

pwhat

A boolean indicating whether to estimate the conditional prediction error CDFs.

qwhat

A boolean indicating whether to estimate the conditional prediction error quantile functions.

mcrwhat

A boolean indicating whether to estimate the conditional misclassification rate.

alpha

A vector of type-I error rates desired for the conditional prediction intervals; required if intervalwhat is TRUE.

n.test

The number of test observations.

Details

This function is for internal use.

Value

A data.frame with one or more of the following columns:

pred

The random forest predictions of the test observations

mspe

The estimated conditional mean squared prediction errors of the random forest predictions

bias

The estimated conditional biases of the random forest predictions

lower_alpha

The estimated lower bounds of the conditional alpha-level prediction intervals for the test observations

upper_alpha

The estimated upper bounds of the conditional alpha-level prediction intervals for the test observations

mcr

The estimated conditional misclassification rate of the random forest predictions

In addition, one or both of the following functions:

perror

The estimated cumulative distribution functions of the conditional error distributions associated with the test predictions

qerror

The estimated quantile functions of the conditional error distributions associated with the test predictions

Author(s)

Benjamin Lu <b.lu@berkeley.edu>; Johanna Hardin <jo.hardin@pomona.edu>

See Also

quantForestError, findOOBErrors, findTestPreds


forestError documentation built on Aug. 11, 2021, 1:06 a.m.