setEnsembleFromDesign.Rd
Create setting for creating ensemble from model settings
setEnsembleFromDesign(
modelDesignList,
databaseDetails,
filterSettings,
combinerSettings
)
A list of model designs to develop and then combine. Each model design is
created by PatientLevelPrediction::createModelDesign()
The OMOP CDM database details and connection for extracting the data
Setting specifying rules to use to filter (remove) any model specified in the list of model designs that performs insufficiently (these models get ignored from the ensemble)
Settings specifying how to combine the remaining models into an ensemble
if (FALSE) {
modelDesign1 <- PatientLevelPrediction::createModelDesign(targetId = 4,
outcomeId = 3,
restrictPlpDataSettings = restrictPlpDataSettings,
covariateSettings = covSet,
runCovariateSummary = F,
modelSettings = PatientLevelPrediction::setLassoLogisticRegression(),
populationSettings = populationSet,
preprocessSettings = PatientLevelPrediction::createPreprocessSettings())
modelDesign2 <- PatientLevelPrediction::createModelDesign(targetId = 4,
outcomeId = 3,
restrictPlpDataSettings = restrictPlpDataSettings,
covariateSettings = covSet,
runCovariateSummary = F,
modelSettings = PatientLevelPrediction::setGradientBoostingMachine(),
populationSettings = populationSet,
preprocessSettings = PatientLevelPrediction::createPreprocessSettings())
ensembleSettings <- setEnsembleFromDesign(modelDesignList = list(modelDesign1, modelDesign2),
databaseDetails = PatientLevelPrediction::createDatabaseDetails(),
filterSettings = list(minValue = 0.5, maxValue = 1),
combinerSettings = createFusionCombiner(type = "uniform",
evaluation = "CV",
scaleFunction = "normalize"))
}