Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Write create_trends_ensemble function #8

Closed
lshandross opened this issue Oct 21, 2024 · 0 comments · Fixed by #11
Closed

Write create_trends_ensemble function #8

lshandross opened this issue Oct 21, 2024 · 0 comments · Fixed by #11

Comments

@lshandross
Copy link
Collaborator

Write function that generates predictions for the trends ensemble

create_trends_ensemble(component_variations, target_ts, reference_date, horizons, quantile_levels, n_samples, return.base_forecasts = FALSE)

Wrapper function that fits all the user-specified variations of the component baseline model (for all locations provided in target_ts) for the given reference date and ensembles them. Returns the trends ensemble forecasts in a hubverse format, with the option to specify whether to also return a model_out_tbl of all baseline forecasts.

Inputs:

  • component_variations a data frame where each row specifies a set of hyperparameters to use for a single baseline model fit, with the following columns and possible values for each:
    • transformation (character): "none" or "sqrt"
    • symmetric (boolean)
    • window_size (integer)
    • temporal_resolution (character): "daily" or "weekly"
  • target_ts a data frame of target data in a time series format (contains columns time_index, location, and observation)
  • reference_date date giving the reference date for the forecasts
  • horizons a numeric vector of prediction horizons relative to the reference date, e.g. 0:3 or 1:4
  • quantile_levels numeric vector of quantile levels to output. Set to NA if quantile outputs not requested
  • n_samples integer of samples to output (and to predict). Set to NA if sample outputs not requested, in which case 100,000 are generated by default
  • return.base_forecasts boolean specifying whether or not to return the component baseline models' forecasts in addition to the trends ensemble forecasts. If TRUE, a two-item list will be returned containing a labeled model_out_tbl of each
@lshandross lshandross changed the title Write fit_trends_ensemble function Write create_trends_ensemble function Oct 21, 2024
@lshandross lshandross linked a pull request Nov 14, 2024 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant