predict.pirf | R Documentation |
Implements seven different random forest prediction interval methods.
## S3 method for class 'pirf'
predict(
res,
pred_data = NULL,
num_threads = parallel::detectCores(),
concise = TRUE,
interval_type = "two-sided",
alpha = 0.1,
...
)
num_threads |
The number of threads to use in parallel. Default is the current number of cores. |
concise |
If concise = TRUE, only predictions output. Defaults to |
interval_type |
Type of prediction interval to generate.
Options are |
alpha |
Significance level for prediction intervals. Defaults to |
formula |
Object of class formula or character describing the model to fit. Interaction terms supported only for numerical variables. |
train_data |
Training data of class data.frame. |
test_data |
Test data of class data.frame. Utilizes ranger::predict() to produce prediction intervals for test data. |
method |
Choose what method to generate RF prediction intervals. Options are |
num_trees |
Number of trees used in the random forest. |
min_node_size |
Minimum number of observations before split at a node. |
m_try |
Number of variables to randomly select from at each split. |
seed |
Seed for random number generation. Currently not utilized. |
prop |
Proportion of training data to sample for each tree. Only for |
symmetry |
True if constructing symmetric out-of-bag prediction intervals, False otherwise. Used only |
calibrate |
If |
Roy_method |
Interval method for |
variant |
Choose which variant to use. Options are |
Ghosal_num_stages |
Number of total stages. Only for |
featureBias |
Remove feature bias. Only for |
predictionBias |
Remove prediction bias. Only for |
Tung_R |
Number of repetitions used in bias removal. Only for |
Tung_num_trees |
Number of trees used in bias removal. Only for |
The seven methods implemented are cited in the References section.
Additional information can be found within those references.
Each of these methods are implemented by utilizing the ranger package.
For method = "oob"
, prediction intervals are generated using out-of-bag residuals.
method = "cqrf"
utilizes a split-conformal approach.
method = "bop"
uses a bag-of-predictors approach.
method = "brf"
performs boosting to reduce bias in the random forest, and estimates variance.
The authors provide multiple variants to their methodology.
method = "bcqrf"
debiases feature selection and prediction. Prediction intervals are generated using quantile regression forests.
method = "hdi"
delivers prediction intervals through highest-density interval regression forests.
method = "quantile"
utilizes quantile regression forests.
Chancellor Johnstone
Haozhe Zhang
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.