compareModels {PDATK}R Documentation

Compare Two Mathematical Models Represented as S4 Objects

Description

Compare Two Mathematical Models Represented as S4 Objects

Usage

compareModels(model1, model2, ...)

Arguments

model1

A S4 object representing some kind of mathematical model.

model2

A S4 object representing some kind of mathematical model.

...

Allow new parameters to be defined for this generic.

Value

A S4 object with statistics about the performance of each model.

Examples

data(sampleValPCOSPmodel)
data(sampleClinicalModel)
data(sampleCohortList)

# Set parallelization settings
BiocParallel::register(BiocParallel::SerialParam())

# Train the model
trainedClinicalModel <- trainModel(sampleClinicalModel)

# Predict risk/risk-class
ClinicalPredPCSI <- predictClasses(sampleCohortList[c('PCSI', 'TCGA')],
  model=trainedClinicalModel)

# Validate the models
validatedClinicalModel <- validateModel(trainedClinicalModel,
  valData=ClinicalPredPCSI)

# Compare the models
modelComp <- compareModels(sampleValPCOSPmodel, validatedClinicalModel)
head(modelComp)


[Package PDATK version 1.0.2 Index]