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

Update forecast loop #189

Open
capelastegui opened this issue Aug 4, 2020 · 0 comments
Open

Update forecast loop #189

capelastegui opened this issue Aug 4, 2020 · 0 comments

Comments

@capelastegui
Copy link
Contributor

At the moment, run_forecast takes candidate trend and seasonality models, and fits all possible combinations. This gets very inefficient as new models are introduced. We should move towards a stepwise flow, where models are added incrementally, and only the best-fitting models progress to subsequent steps.

New workflow:

  • normalize_df_in(df_in_raw): Normalize input. Returns df_in (normalized) and df_norm_map: table that can be used to restore column names
  • get_df_models(df_in): Generate table with models to use, in sequence, to forecast each source. Returns df_model
  • forecast_fit_single(df_in, source_id, df_models): Fit forecasts for single source, sequentially. Returns df_metadata
  • get_df_forecast(df_in, df_metadata, t_extrapolate, add_pi, include_all_models): Extrapolate forecast for models. Returns df_forecast
  • denormalize_df(df_forecast, df_norm_map)

Notes:

  • season_add_mult - relevant in forecast_fit_single, not get_df_models
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant