The SpeciesEvaluation class is responsible for evaluating the performance of a model across different species. It computes statistics, generates comparisons, and produces reports for each species based on the provided configuration and workspace.

Details

The class uses a backend for parallel processing and a workspace to access simulation and observation data. It provides methods to run evaluations, summarize results, and export findings.

Active bindings

success

A logical value indicating whether the species evaluation was successful. The evaluation is considered successful if all species comparisons were performed and there are no critical variables identified in any of the comparisons.

Methods


SpeciesEvaluation$new()

Create a new SpeciesEvaluation object.

Usage

SpeciesEvaluation$new(
  config,
  workspace = NULL,
  backend = NULL,
  logger = default_logger
)

Arguments

config

A Configuration object containing the necessary parameters for the evaluation.

workspace

An optional EvalWorkspace object. If not provided, a new EvalWorkspace will be created using the provided configuration.

backend

An optional ParallelBackend object for parallel processing. If not provided, a new ParallelBackend will be created using the provided configuration.

logger

An optional logger object for logging messages. If not provided, the default logger will be used.


SpeciesEvaluation$run()

Run the species evaluation. This method performs the species evaluation by generating statistics and comparisons for each species based on the provided configuration and workspace.

Usage

SpeciesEvaluation$run()


SpeciesEvaluation$summary()

Print a summary of the species evaluation results.

Usage

SpeciesEvaluation$summary()


SpeciesEvaluation$export()

Export the species evaluation results to CSV files and plots. This method exports the statistics, rRMSE comparisons, and deteriorated USM data to CSV files in the specified output directory. It also generates plots for each species and saves them in the "plots" subdirectory.

Usage

SpeciesEvaluation$export()


SpeciesEvaluation$clone()

The objects of this class are cloneable with this method.

Usage

SpeciesEvaluation$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
config <- list(
   eval_workspace = "path/to/eval_workspace",
   usms = c("USM1", "USM2"),
   species = c("Species1", "Species2"),
   var2exclude = c("var1", "var2"),
   percentage = 10,
   parallel = TRUE,
   cores = 4,
   output_dir = "path/to/output"
)
species_eval <- SpeciesEvaluation$new(config = config)
species_eval$run()
} # }