Learn R Programming

OhdsiReportGenerator (version 2.0.2)

getPredictionLift: 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
)

Value

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

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

See Also

Other Prediction: getFullPredictionPerformances(), getPredictionAggregateTopPredictors(), getPredictionCohorts(), getPredictionCovariates(), getPredictionDiagnosticTable(), getPredictionDiagnostics(), getPredictionHyperParamSearch(), getPredictionIntercept(), getPredictionModelDesigns(), getPredictionOutcomes(), getPredictionPerformanceTable(), getPredictionPerformances(), getPredictionTargets(), getPredictionTopPredictors()

Examples

Run this code
conDet <- getExampleConnectionDetails()

connectionHandler <- ResultModelManager::ConnectionHandler$new(conDet)

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

Run the code above in your browser using DataLab