The write_model
function (opposed to the write_output
) is a
generic wrapper to writing a DistributionModel
to disk. It is essentially
a wrapper to saveRDS
. Models can be loaded again via the load_model
function.
Arguments
- mod
Provided
DistributionModel
object.- fname
A
character
depicting an output filename.- slim
A
logical
option to whether unnecessary entries in the model object should be deleted. This deletes for example predictions or any other non-model content from the object (Default:FALSE
).- verbose
logical
indicating whether messages should be shown. OverwritesgetOption("ibis.setupmessages")
(Default:TRUE
).
Examples
if (FALSE) { # \dontrun{
x <- distribution(background) |>
add_biodiversity_poipo(virtual_points, field_occurrence = 'observed', name = 'Virtual points') |>
add_predictors(pred_current, transform = 'scale',derivates = 'none') |>
engine_xgboost(nrounds = 2000) |> train(varsel = FALSE, only_linear = TRUE)
write_model(x, "testmodel.rds")
} # }