trainAndTestRF: trainAndTestRF

View source: R/rf.R

trainAndTestRFR Documentation

trainAndTestRF

Description

trainAndTestRF

Usage

trainAndTestRF(
  trainXs,
  trainY,
  testXs = NULL,
  testY = NULL,
  metric = "AUC",
  ntree = 500,
  mtry = NULL,
  nodesize = NULL,
  pipelineRunInformation,
  logOverride = NULL
)

Arguments

trainXs

A matrix/data.frame corresponding to X (variables) in the training set. Columns should correspond to features

trainY

A vector/list corresponding to Y (labels) in the training set.

testXs

A matrix/data.frame corresponding to X (variables) in the test set. Columns should correspond to the same features in trainXs. If not provided, trainXs is used as testXs.

testY

A vector/list corresponding to Y (labels) in the test set. If not provided, trainY is used as testY.

metric

'AUC' or 'PRAUC'. The metric to be calculated on test set prediction.

ntree

The number of trees to fit in the model.

mtry

The number of features to be selected at random and considered at each node during tree fitting.

nodesize

The minimum size of terminal nodes.

pipelineRunInformation

The object originally created by beginPipelineRun.

logOverride

NULL, TRUE or FALSE. Used to override the 'log' entry in pipelineRunInformation. Ignored if NULL.

Value

A list containing the model and the metric calculated for test set prediction.


marioni-group/MethylPipeR documentation built on Oct. 10, 2024, 3:32 p.m.