View source: R/PredictionQueries.R
getPredictionCohorts | R Documentation |
This function extracts the target and outcome cohorts used to develop any model in the results
getPredictionCohorts(
connectionHandler,
schema,
plpTablePrefix = "plp_",
cgTablePrefix = "cg_"
)
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 |
Specify the connectionHandler, the resultDatabaseSettings and any targetIds or outcomeIds to restrict models to
Returns a data.frame with the columns:
cohortId the cohort definition ID
cohortName the name of the cohort
type whether the cohort was used as a target or outcome cohort
Other Prediction:
getPredictionDiagnosticTable()
,
getPredictionDiagnostics()
,
getPredictionHyperParamSearch()
,
getPredictionIntercept()
,
getPredictionModelDesigns()
,
getPredictionPerformanceTable()
,
getPredictionPerformances()
,
getPredictionTopPredictors()
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
predCohorts <- getPredictionCohorts(
connectionHandler = connectionHandler,
schema = 'main'
)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.