MinSizeRFcontinuous: Random forest algorithm for minimum sample size estimation of...

View source: R/MinSizeRFcontinuous.R

MinSizeRFcontinuousR Documentation

Random forest algorithm for minimum sample size estimation of regression

Description

This algorithm determines the minimum sample size to use with the algorithm random forest, given a minimum value for the metric ("R2")

Usage

MinSizeRFcontinuous(X, Y, thr_R2, p_vec = 1:99/100, n.cores = 1)

Arguments

X

Dataset of variable/s to use for prediction.

Y

Vector with the predictor variable, i.e., single numeric variable to predict

thr_R2

Threshold on the R2 metric to calculate the corresponding minimum sample size.

p_vec

Vector of ratios to divide training data into. Code loops through the different ratios to get a sample size and calculate the corresponding metric. Default is 1:99/100

n.cores

Number of logical CPU threads to use. Default is 1.

Value

List with minimum sample size, corresponding CI, dataframe with sample size, corresponding obtained metrics, and fit parameters of the metric.


gpcastelo/ML-minimum-sample-size documentation built on June 3, 2023, 8:48 p.m.