Combine multiple forecasts' output into a single ensemble. Presently, only a general average ensemble is available.
Usage
ensemble_forecasts(
main = ".",
method = "unwtavg",
forecasts_groups = NULL,
forecasts_ids = NULL,
forecast_table = NULL,
historic_end_newmoonnumber = NULL,
models = NULL,
dataset = NULL,
species = NULL
)Arguments
- main
charactervalue of the name of the main component of the directory tree.- method
charactervalue of the name of the ensemble method to use. Presently, only"unwtavg"(unweighted average) is allowed.- forecasts_groups
integer(or integernumeric) value of the forecasts groups to combine with an ensemble. IfNULL(default), the most recent forecast group is ensembled.- forecasts_ids
integer(or integernumeric) values representing the forecasts of interest for restricting ensembling, as indexed within the directory in thecastssub folder. See the forecasts metadata file (forecasts_metadata.csv) for summary information.- forecast_table
Optional
data.frameof forecast table outputs. If not input, will be loaded.- historic_end_newmoonnumber
integer(or integernumeric) newmoon number of the forecast origin. Default value isNULL, which equates to no selection.- models
charactervalue(s) of the name of the model to include. Default value isNULL, which equates to no selection with respect tomodel.NULLtranslates to allmodelsin the table.- dataset
charactervalue of the rodent data set to include Default value isNULL, which equates to the first data set encountered.- species
charactervector of the species code(s) or"total"for the total across species) to be plottedNULLtranslates to the species defined byforecasting_speciescalled byprefab_species.
Details
A pre-loaded table of forecasts can be input, but if not (default), the table will be efficiently (as defined by the inputs) loaded and trimmed.
The forecasts can be trimmed specifically using the forecasts_ids input, otherwise, all relevant forecasts from the stated forecast_groups will be included.
See also
Core forecasting functions:
evaluate forecasts,
portalcast(),
process forecast output
Examples
if (FALSE) { # \dontrun{
main1 <- file.path(tempdir(), "ensemble")
setup_production(main = main1)
forecasts_ids <- select_forecasts(main = main1,
datasets = "controls",
species = "DM")$forecast_id
ensemble_forecasts(main = main1,
forecasts_ids = forecasts_ids)
unlink(main1, recursive = TRUE)
} # }