standardRF: Standard random forests algorithm serves as a baseline model

Description Usage Arguments Value See Also Examples

View source: R/classification.R

Description

Standard random forests algorithm serves as a baseline model

Usage

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
standardRF(
  train.ds = NULL,
  holdout.ds = NULL,
  validation.ds = NULL,
  label = "class",
  rf.ntree = 500,
  rf.mtry = NULL,
  is.simulated = TRUE,
  signal.names = NULL,
  save.file = NULL,
  verbose = FALSE
)

Arguments

train.ds

A data frame with training data and outcome labels

holdout.ds

A data frame with holdout data and outcome labels

validation.ds

A data frame with validation data and outcome labels

label

A character vector of the outcome variable column name

rf.ntree

An integer the number of trees in the random forest

rf.mtry

An integer the number of variables sampled at each random forest node split

is.simulated

Is the data simulated (or real?)

signal.names

A character vector of signal names in simulated data

save.file

A character vector for results filename or NULL to skip

verbose

A flag indicating whether verbose output be sent to stdout

Value

A list containing:

algo.acc

data frame of results, a row for each update

ggplot.data

melted results data frame for plotting

correct

number of variables detected correctly in each data set

elapsed

total elapsed time

See Also

Other classification: epistasisRank(), getImportanceScores(), originalThresholdout(), privateEC(), privateRF(), xgboostRF()

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
num.samples <- 100
num.variables <- 100
pct.signals <- 0.1
label <- "class"
sim.data <- createSimulation(num.variables = num.variables,
                             num.samples = num.samples,
                             pct.signals = pct.signals,
                             label = label,
                             sim.type = "mainEffect",
                             pct.train = 1 / 3,
                             pct.holdout = 1 / 3,
                             pct.validation = 1 / 3,
                             verbose = FALSE)
rra.results <- standardRF(train.ds=sim.data$train,
                          holdout.ds=sim.data$holdout,
                          validation.ds=sim.data$validation,
                          label=sim.data$label,
                          is.simulated=TRUE,
                          verbose=FALSE,
                          signal.names=sim.data$signal.names)

insilico/privateEC documentation built on May 22, 2020, 5:12 p.m.