Evaluates the performance of the patient level prediction model
evaluatePlp(prediction, typeColumn = "evaluationType")
An object of class plpEvaluation containing the following components
evaluationStatistics: A data frame containing the evaluation statistics'
thresholdSummary: A data frame containing the threshold summary'
demographicSummary: A data frame containing the demographic summary'
calibrationSummary: A data frame containing the calibration summary'
predictionDistribution: A data frame containing the prediction distribution'
The patient level prediction model's prediction
The column name in the prediction object that is used to stratify the evaluation
The function calculates various metrics to measure the performance of the model
# takes too long to run
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n= 1500)
population <- createStudyPopulation(plpData, outcomeId = 3,
populationSettings = createStudyPopulationSettings())
data <- splitData(plpData, population, splitSettings=createDefaultSplitSetting(splitSeed=42))
data$Train$covariateData <- preprocessData(data$Train$covariateData,
createPreprocessSettings())
path <- file.path(tempdir(), "plp")
model <- fitPlp(data$Train, modelSettings=setLassoLogisticRegression(seed=42),
analysisId=1, analysisPath = path)
evaluatePlp(model$prediction) # Train and CV metrics
Run the code above in your browser using DataLab