Skip to contents

The write_summary function is a wrapper function to create summaries from fitted DistributionModel or BiodiversityScenario objects. This function will extract parameters and statistics about the used data from the input object and writes the output as either 'rds' or 'rdata' file. Alternative, more open file formats are under consideration.

Usage

write_summary(
  mod,
  fname,
  partial = FALSE,
  verbose = getOption("ibis.setupmessages", default = TRUE),
  ...
)

# S4 method for ANY,character
write_summary(
  mod,
  fname,
  partial = FALSE,
  verbose = getOption("ibis.setupmessages", default = TRUE),
  ...
)

Arguments

mod

Provided DistributionModel or BiodiversityScenario object.

fname

A character depicting an output filename. The suffix determines the file type of the output (Options: 'rds', 'rdata').

partial

A logical value determining whether partial variable contributions should be calculated and added to the model summary. Note that this can be rather slow (Default: FALSE).

verbose

logical indicating whether messages should be shown. Overwrites getOption("ibis.setupmessages") (Default: TRUE).

...

Any other arguments passed on the individual functions.

Value

No R-output is created. A file is written to the target direction.

Note

No predictions or tabular data is saved through this function. Use write_output() to save those.

Examples

if (FALSE) {
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_summary(x, "testmodel.rds")
}