Skip to contents

This function extracts the model design settings and min/max/mean AUROC values of the models developed using the model design across databases

Usage

getPredictionModelDesigns(
  connectionHandler,
  schema,
  plpTablePrefix = "plp_",
  cgTablePrefix = "cg_",
  targetIds = NULL,
  outcomeIds = NULL
)

Arguments

connectionHandler

A connection handler that connects to the database and extracts sql queries. Create a connection handler via `ResultModelManager::ConnectionHandler$new()`.

schema

The result database schema (e.g., 'main' for sqlite)

plpTablePrefix

The prefix used for the patient level prediction results tables

cgTablePrefix

The prefix used for the cohort generator results tables

targetIds

A vector of integers corresponding to the target cohort IDs

outcomeIds

A vector of integers corresponding to the outcome cohort IDs

Value

Returns a data.frame with the columns:

  • modelDesignId a unique identifier in the database for the model design

  • modelType the type of classifier or surival model

  • developmentTargetId a unique identifier for the development target ID

  • developmentTargetName the name of the development target cohort

  • developmentTargetJson the json of the target cohort

  • developmentOutcomeId a unique identifier for the development outcome ID

  • developmentOutcomeName the name of the development outcome cohort

  • timeAtRisk the time at risk string

  • developmentOutcomeJson the json of the outcome cohort

  • covariateSettingsJson the covariate settings json

  • populationSettingsJson the population settings json

  • tidyCovariatesSettingsJson the tidy covariate settings json

  • plpDataSettingsJson the plp data extraction settings json

  • featureEngineeringSettingsJson the feature engineering settings json

  • splitSettingsJson the split settings json

  • sampleSettingsJson the sample settings json

  • minAuroc the min AUROC value of models developed using the model design across databases

  • meanAuroc the mean AUROC value of models developed using the model design across databases

  • maxAuroc the max AUROC value of models developed using the model design across databases

  • noDiagnosticDatabases the number of databases where the model design diagnostics were generated

  • noDevelopmentDatabases the number of databases where the model design was used to develop models

  • noValidationDatabases the number of databases where the models developed using the model design was externally validated

Details

Specify the connectionHandler, the resultDatabaseSettings and (optionally) any targetIds or outcomeIds to restrict model designs to

Examples

conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver

modDesign <- getPredictionModelDesigns(
  connectionHandler = connectionHandler, 
  schema = 'main'
)