getPredictionLift: Extract model lift at given model sensitivity

View source: R/PredictionQueries.R

getPredictionLiftR Documentation

Extract model lift at given model sensitivity

Description

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

Details

Specify the connectionHandler, the resultDatabaseSettings and (optionally) modelDesignIds or performanceIds to filter to

Value

Returns a data.frame with the columns: modelDesignId, performanceId, evaluation, sensitivity, outcomeCount, positivePredictiveValue, outcomeRate and lift.

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)

liftsAt0p15 <- getPredictionLift(
  connectionHandler = connectionHandler, 
  schema = 'main', 
  sensitivity = 0.15
)


OhdsiReportGenerator documentation built on Nov. 14, 2026, 1:09 a.m.