pirf | R Documentation |
Implements seven different random forest prediction interval methods.
pirf(
formula = NULL,
train_data = NULL,
method = "oob",
alpha = 0.1,
symmetry = TRUE,
seed = NULL,
m_try = NULL,
num_trees = 500,
min_node_size = NULL,
num_threads = parallel::detectCores(),
calibrate = FALSE,
Roy_method = "quantile",
featureBias = FALSE,
predictionBias = TRUE,
Tung_R = 5,
Tung_num_trees = 75,
variant = 1,
Ghosal_num_stages = 2,
prop = 0.618,
concise = TRUE,
interval_type = "two-sided",
...
)
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. |
method |
Choose what method to generate RF prediction intervals. Options are |
alpha |
Significance level for prediction intervals. Defaults to |
symmetry |
True if constructing symmetric out-of-bag prediction intervals, False otherwise. Used only |
seed |
Seed for random number generation. Currently not utilized. |
m_try |
Number of variables to randomly select from at each split. |
num_trees |
Number of trees used in the random forest. |
min_node_size |
Minimum number of observations before split at a node. |
num_threads |
The number of threads to use in parallel. Default is the current number of cores. |
calibrate |
If |
Roy_method |
Interval method 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 |
variant |
Choose which variant to use. Options are |
Ghosal_num_stages |
Number of total stages. Only for |
prop |
Proportion of training data to sample for each tree. Only for |
concise |
If concise = TRUE, only predictions output. Defaults to |
interval_type |
Type of prediction interval to generate.
Options are |
test_data |
Test data of class data.frame. Utilizes ranger::predict() to produce prediction intervals for test data. |
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
ranger
rfinterval
predict.pirf
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.