Manage the evaluation workspace

Methods


EvalWorkspace$new()

Create an evaluation workspace manager

Usage

EvalWorkspace$new(data_dir, version = NULL)

Arguments

data_dir

Path to the evaluation workspace

version

Optional, the version of STICS to use for the data extraction. If not defined the last evaluated version will be used.


EvalWorkspace$save_sim()

Save simulations

Usage

EvalWorkspace$save_sim(sim, usms_species)

Arguments

sim

the list of simulations

usms_species

a dataframe which associates a USM to its species


EvalWorkspace$save_obs()

Save observations

Usage

EvalWorkspace$save_obs(obs, usms_species)

Arguments

obs

the list of observations

usms_species

a dataframe which associates a USM to its species


EvalWorkspace$get_species()

Returns the list of species

Usage

EvalWorkspace$get_species()

Returns

a list of species as character list


EvalWorkspace$get_species_usm()

Returns the list of USMs of a species

Usage

EvalWorkspace$get_species_usm(species, usms = NULL)

Arguments

species

the species to search for

usms

Optional, filter the USMs returned by the function

Returns

a list of USMs as a character list


EvalWorkspace$get_sim()

Return the simulation

Usage

EvalWorkspace$get_sim(
  species = NULL,
  usms = NULL,
  var2exclude = NULL,
  collect = TRUE
)

Arguments

species

Optional, if defined filter the simulations with this species

usms

Optional, if defined filter the simulations with these USMs

var2exclude

Optional, if defined remove the variables from the returned simulations

collect

Optional, if TRUE a dataframe will be returned, otherwise the lazy arrow data object will be returned

Returns

a dataframe if collect is TRUE, a lazy arrow data object


EvalWorkspace$get_obs()

Return the observation

Usage

EvalWorkspace$get_obs(
  species = NULL,
  usms = NULL,
  var2exclude = NULL,
  collect = TRUE
)

Arguments

species

Optional, if defined filter the observations with this species

usms

Optional, if defined filter the observations with these USMs

var2exclude

Optional, if defined remove the variables from the returned observations

collect

Optional, if TRUE a dataframe will be returned, otherwise the lazy arrow data object will be returned

Returns

a dataframe if collect is TRUE, a lazy arrow data object


EvalWorkspace$save_stats()

Save a species statistics

Usage

EvalWorkspace$save_stats(species, stats)

Arguments

species

the species

stats

the statistics as a dataframe


EvalWorkspace$save_global_stats()

Save global statistics

Usage

EvalWorkspace$save_global_stats(stats)

Arguments

stats

the global statistics as a dataframe


EvalWorkspace$get_stats()

Return statistics for a species

Usage

EvalWorkspace$get_stats(species, collect = FALSE)

Arguments

species

the species

collect

Optional, if TRUE returns a dataframe, otherwise a lazy arrow data object will be returned

Returns

the statistics, as a dataframe if collect is TRUE, a lazy arrow data object otherwise


EvalWorkspace$get_global_stats()

Return global statistics

Usage

EvalWorkspace$get_global_stats(collect = FALSE)

Arguments

collect

Optional, if TRUE returns a dataframe, otherwise a lazy arrow data object will be returned

Returns

the global statistics, as a dataframe if collect is TRUE, a lazy arrow data object otherwise


EvalWorkspace$save_rmse_per_usm()

Save the RMSE per USM

Usage

EvalWorkspace$save_rmse_per_usm(species, rmse_per_usm)

Arguments

species

the species

rmse_per_usm

the RMSE per USMs


EvalWorkspace$get_rmse_per_usm()

Return the RMSE per USM for a species

Usage

EvalWorkspace$get_rmse_per_usm(
  species = NULL,
  collect = FALSE,
  usms = NULL,
  var2exclude = NULL
)

Arguments

species

Optional, the species

collect

Optional, if TRUE a dataframe will be returned, otherwise a lazy arrow data object will be returned

usms

Optional, if defined filter the RMSE per USM with these USMs

var2exclude

Optional, if defined remove the variables from the returned RMSE per USM

Returns

the RMSE per USM for a species, as a dataframe if collect is TRUE, a lazy arrow data object otherwise


EvalWorkspace$save_deteriorated_usm()

Save the deteriorated USM

Usage

EvalWorkspace$save_deteriorated_usm(deteriorated)

Arguments

deteriorated

the deteriorated USM object


EvalWorkspace$get_deteriorated_usm()

Get the deteriorated USM comparison for a species

Usage

EvalWorkspace$get_deteriorated_usm(species, percentage)

Arguments

species

the species

percentage

the percentage

Returns

a DeterioratedUSMComparison object


EvalWorkspace$save_species_comparison()

Save the species comparison

Usage

EvalWorkspace$save_species_comparison(spec_comparison)

Arguments

spec_comparison

the species comparison object


EvalWorkspace$save_global_comparison()

Save the global comparison

Usage

EvalWorkspace$save_global_comparison(spec_comparison)

Arguments

spec_comparison

the global comparison object


EvalWorkspace$get_species_comparison()

Get the species comparison for a species

Usage

EvalWorkspace$get_species_comparison(species, percentage)

Arguments

species

the species

percentage

the percentage

Returns

an RmseComparison object


EvalWorkspace$get_global_comparison()

Get the global comparison

Usage

EvalWorkspace$get_global_comparison(percentage)

Arguments

percentage

the percentage

Returns

an RmseComparison object


EvalWorkspace$save_metadata()

Save the metadata

Usage

EvalWorkspace$save_metadata(metadata)

Arguments

metadata

the metadata dataframe


EvalWorkspace$add_evaluated_version()

Add an evaluated version to the metadata

Usage

EvalWorkspace$add_evaluated_version(version)

Arguments

version

the STICS version


EvalWorkspace$get_all_versions()

Get all evaluated versions

Usage

EvalWorkspace$get_all_versions()

Returns

a list of versions


EvalWorkspace$get_stics_version()

Get the last evaluated STICS version

Usage

EvalWorkspace$get_stics_version()

Returns

the STICS version


EvalWorkspace$with_version()

Create a new EvalWorkspace with a specific version

Usage

EvalWorkspace$with_version(version)

Arguments

version

the version

Returns

an EvalWorkspace object


EvalWorkspace$set_version()

Set the version of the evaluation workspace

Usage

EvalWorkspace$set_version(v)

Arguments

v

the version to set


EvalWorkspace$get_version()

Get the current version of the evaluation workspace

Usage

EvalWorkspace$get_version()

Returns

the current version of the evaluation workspace


EvalWorkspace$remove_init_obs()

Remove the initial observations (HR_1 to HR_5, AZnit_1 to AZnit_5, resmes and azomes) from the observations dataset This function is used to remove the initial observations from the dataset, which are not relevant for the evaluation and can bias the results. The initial observations are defined as the observations of the first date of each situation (USM) for the variables HR_1 to HR_5 and AZnit_1 to AZnit_5, resmes and azomes. This function will replace the initial observations by NA in the dataset.

Usage

EvalWorkspace$remove_init_obs()


EvalWorkspace$clone()

The objects of this class are cloneable with this method.

Usage

EvalWorkspace$clone(deep = FALSE)

Arguments

deep

Whether to make a deep clone.

Examples

if (FALSE) { # \dontrun{
ws <- EvalWorkspace$new(
  data_dir = "/path/to/eval_workspace"
)
} # }