gp_saveload {gplite} | R Documentation |
Convenience functions for saving and loading GP models.
gp_save(gp, filename)
gp_load(filename)
gp |
The gp model object to be saved. |
filename |
Where to save or load from. |
gp_load
returns the loaded GP model object.
gp <- gp_init()
# fit the model (skipped here)
# save the model
filename <- file.path(tempdir(), 'gp.rda')
gp_save(gp, filename)
# load the model and remove the file
gp <- gp_load(filename)
file.remove(filename)