calibrate_model: tests and trains a model for a disease using a training and...

View source: R/fn_spongeffects_utility.R

calibrate_modelR Documentation

tests and trains a model for a disease using a training and test data set (e.g., TCGA-BRCA and METABRIC)

Description

tests and trains a model for a disease using a training and test data set (e.g., TCGA-BRCA and METABRIC)

Usage

calibrate_model(
  Input,
  modules_metadata,
  label,
  sampleIDs,
  Metric = "Exact_match",
  tunegrid_c = c(1:100),
  n_folds = 10,
  repetitions = 3
)

Arguments

Input

Features to use for model calibration.

modules_metadata

metadata table containing information about samples/patients

label

Column of metadata to use as label in classification model

sampleIDs

Column of metadata containing sample/patient IDs to be matched with column names of spongEffects scores

Metric

metric (Exact_match, Accuracy) (default: Exact_match)

tunegrid_c

defines the grid for the hyperparameter optimization during cross validation (caret package) (default: 1:100)

n_folds

number of folds (default: 10)

repetitions

number of k-fold cv iterations (default: 3)

modules

return from enrichment_modules() function

Value

returns a list with the trained model and the prediction results Calibrate classification RF classification model

returns a list with the trained model and the prediction results


mlist/SPONGE documentation built on Feb. 12, 2023, 1:22 a.m.