savePlpModel {PatientLevelPrediction} | R Documentation |
Saves the plp model
Description
Saves the plp model
Usage
savePlpModel(plpModel, dirPath)
Arguments
plpModel |
A trained classifier returned by running |
dirPath |
A location to save the model to |
Details
Saves the plp model to a user specificed folder
Value
The directory path where the model was saved
Examples
data("simulationProfile")
plpData <- simulatePlpData(simulationProfile, n = 1000)
saveLoc <- file.path(tempdir(), "savePlpModel")
plpResult <- runPlp(plpData, outcomeId = 3, saveDirectory = saveLoc)
path <- savePlpModel(plpResult$model, file.path(saveLoc, "savedModel"))
# show the saved model
dir(path, full.names = TRUE)
# clean up
unlink(saveLoc, recursive = TRUE)
[Package PatientLevelPrediction version 6.4.1 Index]