evaluatePlp | R Documentation |
Evaluates the performance of the patient level prediction model
evaluatePlp(prediction, typeColumn = "evaluationType")
prediction |
The patient level prediction model's prediction |
typeColumn |
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
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'
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
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.