rfCV: rfCV

View source: R/rf.R

rfCVR Documentation

rfCV

Description

rfCV

Usage

rfCV(
  dataset,
  labels,
  foldIDs,
  metric = "AUC",
  ntrees,
  mtrys,
  nodesizes,
  pipelineRunInformation,
  testXs = NULL,
  testY = NULL
)

Arguments

dataset

A matrix/data.frame corresponding to X (variables) to be used in the cross-validation.

labels

A vector/list corresponding to Y (labels) to be used in the cross-validation.

foldIDs

A vector/list with the same length as labels denoting for each row in the dataset, which fold it will be assigned to.

metric

'AUC' or 'PRAUC', the metric that will be used to determine the optimal hyperparameters in the grid search.

ntrees

A vector/list containing all the values of ntree to be tried in the grid search.

mtrys

A vector/list containing all the values of mtry to be tried in the grid search.

nodesizes

A vector/list containing all the values of nodesize to be tried in the grid search.

pipelineRunInformation

The object originally created by beginPipelineRun.

testXs

A matrix/data.frame corresponding to the test set X (variables) used to evaluate the final model. If NULL, the training set is used as the test set.

testY

A vector/list corresponding to the test set Y (labels) to be used to evaluate the final model. If NULL, the training set labels are used.

Value

A data.frame showing for each combination of hyperparameters, the (mean) metric calculated on the test fold predictions.


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