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.
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.
successA 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.
SpeciesEvaluation$new()Create a new SpeciesEvaluation object.
SpeciesEvaluation$new(
config,
workspace = NULL,
backend = NULL,
logger = default_logger
)configA Configuration object containing the necessary parameters for the evaluation.
workspaceAn optional EvalWorkspace object. If not provided, a new EvalWorkspace will be created using the provided configuration.
backendAn optional ParallelBackend object for parallel processing. If not provided, a new ParallelBackend will be created using the provided configuration.
loggerAn 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.
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.
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()
} # }