View source: R/util-save_load.R
| save_model | R Documentation |
Save a BKT model to a file.
This function saves a trained BKT model to a specified file location. The model is stored
as an RDS file, which can be loaded back into R using the load_model() function.
save_model(model, loc)
model |
A trained BKT model object to be saved. |
loc |
Character. The file path where the model will be saved, typically with an |
None. The function saves the model to the specified location.
data("simulation_data_50", package = "BKT")
model <- bkt(seed = 42, parallel = FALSE, num_fits = 1)
fit_model <- fit(model, data = simulation_data_50)
model_file <- tempfile(fileext = ".rds")
save_model(fit_model, model_file)
unlink(model_file)
Add the following code to your website.
For more information on customizing the embed code, read Embedding Snippets.