savePlpModel: Saves the plp model

View source: R/SaveLoadPlp.R

savePlpModelR Documentation

Saves the plp model

Description

Saves the plp model

Usage

savePlpModel(plpModel, dirPath)

Arguments

plpModel

A trained classifier returned by running runPlp()$model

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)


OHDSI/PatientLevelPrediction documentation built on Feb. 14, 2025, 9:44 a.m.