TungUbRF: Implements RF prediction interval method in Tung, Huang,...

Description Usage Arguments

View source: R/Tung_Huang_Nyugen_Khan_2014.R

Description

This function implements the feature bias and prediction bias methods outlined in Tung 2014.

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
TungUbRF(
  formula = NULL,
  train_data = NULL,
  pred_data = NULL,
  num_trees = NULL,
  min_node_size = NULL,
  m_try = NULL,
  keep_inbag = TRUE,
  intervals = TRUE,
  feature_num_trees = NULL,
  alpha = NULL,
  forest_type = "QRF",
  featureBias = TRUE,
  predictionBias = TRUE,
  R = NULL,
  num_threads = NULL,
  interval_type = NULL
)

Arguments

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. *Should not be an option...

intervals

Generate prediction intervals or not.

alpha

Significance level for prediction intervals.

featureBias

perform feature bias step.

predictionBias

perform prediction bias.

R

number of RFs generated in feature bias stage of Tung 2014 prediction interval. Defualt is 10.

num_threads

The number of threads to use in parallel. Default is the current number of cores.

interval_type

Type of prediction interval to generate. Options are method = c("two-sided", "lower", "upper"). Default is method = "two-sided".

feature_num_tree

number of trees to be used in ech random forest generated for feature bias step.


piRF documentation built on July 1, 2020, 7:51 p.m.