This function extracts the model lift (PPV/outcomeRate)
Usage
getPredictionLift(
connectionHandler,
schema,
plpTablePrefix = "plp_",
modelDesignIds = NULL,
performanceIds = NULL,
sensitivity = 0.1
)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
- modelDesignIds
(optional) restrict to the input modelDesignIds
- performanceIds
(optional) restrict to the input performanceIds
- sensitivity
(default 0.1) the lift at the threshold with the sensitivity closest to this value is return
Value
Returns a data.frame with the columns: modelDesignId, performanceId, evaluation, sensitivity, outcomeCount, positivePredictiveValue, outcomeRate and lift.
Details
Specify the connectionHandler, the resultDatabaseSettings and (optionally) modelDesignIds or performanceIds to filter to
See also
Other Prediction:
getFullPredictionPerformances(),
getPredictionAggregateTopPredictors(),
getPredictionCohorts(),
getPredictionCovariates(),
getPredictionDiagnosticTable(),
getPredictionDiagnostics(),
getPredictionHyperParamSearch(),
getPredictionIntercept(),
getPredictionModelDesigns(),
getPredictionOutcomes(),
getPredictionPerformanceTable(),
getPredictionPerformances(),
getPredictionTargets(),
getPredictionTopPredictors()
Examples
conDet <- getExampleConnectionDetails()
connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)
#> Connecting using SQLite driver
liftsAt0p15 <- getPredictionLift(
connectionHandler = connectionHandler,
schema = 'main',
sensitivity = 0.15
)