Description Usage Arguments Examples
Apply train model on new data Apply a Patient Level Prediction model on Patient Level Prediction Data and get the predicted risk in [0,1] for each person in the population. If the user inputs a population with an outcomeCount column then the function also returns the evaluation of the prediction (AUC, brier score, calibration)
1 2 3 4 5 6 7 8 | applyModel(
population,
plpData,
plpModel,
calculatePerformance = T,
databaseOutput = NULL,
silent = F
)
|
population |
The population of people who you want to predict the risk for |
plpData |
The plpData for the population |
plpModel |
The trained PatientLevelPrediction model |
calculatePerformance |
Whether to also calculate the performance metrics [default TRUE] |
databaseOutput |
Whether to save the details into the prediction database |
silent |
Whether to turn off progress reporting |
1 2 3 4 5 6 7 8 9 10 11 12 13 14 | ## Not run:
# load the model and data
plpData <- loadPlpData("C:/plpdata")
plpModel <- loadPlpModel("C:/plpmodel")
# use the same population settings as the model:
populationSettings <- plpModel$populationSettings
populationSettings$plpData <- plpData
population <- do.call(createStudyPopulation, populationSettings)
# get the prediction:
prediction <- applyModel(population, plpData, plpModel)$prediction
## End(Not run)
|
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.