ModelComparison: ModelComparison Constructor

Description Usage Arguments Value Examples

View source: R/class-ModelComparison.R

Description

ModelComparison Constructor

Usage

1
ModelComparison(model1, model2, ...)

Arguments

model1

An object with a validationStats method which returns a data.table. Probably this object should inherit from SurvivalModel.

model2

An object with a validationStats method which returns a data.table. Probably this object should inherit from SurvivalModel.

...

Not used.

Value

A ModelComparison object, which is a wrapper for DataFrame which is used for method dispatch.

Examples

 1
 2
 3
 4
 5
 6
 7
 8
 9
10
11
12
13
14
15
16
17
18
19
20
21
data(sampleValPCOSPmodel)
data(sampleClinicalModel)
data(sampleCohortList)

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

# Train the models
trainedClinicalModel <- trainModel(sampleClinicalModel)

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

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

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

bhklab/PDATK documentation built on Dec. 27, 2021, 7:46 a.m.