View source: R/Ghosal_Hooker_2018.R
This function implements variant one and two of the prediction interval methods in Ghosal, Hooker 2018. Used inside rfint().
1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 |
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, matrix, dgCMatrix (Matrix) or gwaa.data (GenABEL). Matches ranger() requirements. |
pred_data |
Test data of class data.frame, matrix, dgCMatrix (Matrix) or gwaa.data (GenABEL). Utilizes ranger::predict() to get prediction intervals for test data. |
num_trees |
Number of trees. |
min_node_size |
Minimum number of observations before split at a node. |
m_try |
Number of variables to randomly select from at each split. |
keep_inbag |
Saves matrix of observations and which tree(s) they occur in. Required to be true to generate variance estimates for Ghosal, Hooker 2018 method. |
intervals |
Generate prediction intervals or not. Defaults to FALSE. |
alpha |
Significance level for prediction intervals. |
prop |
Proportion of training data to sample for each tree. Currently variant 2 not implemented. |
variant |
Choose which variant to use. Currently variant 2 not implemented. |
num_threads |
The number of threads to use in parallel. Default is the current number of cores. |
num_stages |
Number of boosting stages. Functional for >= 2; variance estimates need adjustment for variant 2. |
interval_type |
Type of prediction interval to generate.
Options are |
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.