sa_rfreg: sa_rfreg

View source: R/RandomForest_Functions.R

sa_rfregR Documentation

sa_rfreg

Description

Run random forest regression for train/hold sets labeled train.1 to train.i and hold.1 to hold.i. This function is built to run with Split dataset function in the rf_standard wrapper. If the user does not provide a custom directory name (requires input of date, dataframe.name, and predictors.name), this function requires interaction in the R console.

Usage

sa_rfreg(
  vpred,
  custom.name = FALSE,
  date = "",
  dataframe.name = "",
  predictors.name = "",
  mtry = 1:10,
  ntree = (1:10) * 500,
  nset = 10,
  wd = getwd()
)

Arguments

vpred

Predictor variable as string.

custom.name

(Optional) TRUE or FALSE. Will the user input a custom name for the export directory? If FALSE, user must ineractively provide one in the console. Recommend to set custom.fun = TRUE TRUE for automation. Default: FALSE

date

(Optional). If custome.name = FALSE provide date in the input in a format suitable for folder/directory name.

dataframe.name

(Optional). If custom.name = FALSE provide short name of the dataset.

predictors.name

(Optional). If custom.name = FALSE provide short name of the dataset.

mtry

(Optional) Set range for optimization of mtry in randomForest function (predictor variables to use at each split). Recommend to determine using mtry.guide() Default: 1:10

ntree

(Optional) Set range for optimization of ntrees in randomForest function, Default: (1:10)*500

nset

Number of train/hold sets to try.

wd

See Also

[randomForest()], [mtry.guide()], [split.ratio()],[rf_standard()]


SarahAsbury/BioDataTools documentation built on Feb. 5, 2024, 4:01 p.m.