-
Notifications
You must be signed in to change notification settings - Fork 0
add hub baseline and ensemble functions #11
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
add hub baseline and ensemble functions #11
Conversation
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
…iven-dataset-type-and-disease' of https://github.com/CDCgov/hubhelpr into 4-create-a-hub-formatted-quantiles-baseline-forecasts-given-dataset-type-and-disease
Codecov Report❌ Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #11 +/- ##
===========================================
- Coverage 81.33% 17.73% -63.61%
===========================================
Files 1 3 +2
Lines 75 344 +269
===========================================
Hits 61 61
- Misses 14 283 +269 ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR adds functionality to generate hub baseline and ensemble forecasts for disease monitoring. The changes introduce two main functions for creating forecasts: baseline models using CDC forecasting methods and ensemble models that aggregate multiple submissions.
Key changes:
- Added baseline forecast generation using CDC baseline forecasting methods
- Added ensemble forecast generation that aggregates multiple model submissions
- Updated dependencies to include forecasting and hub-related packages
Reviewed Changes
Copilot reviewed 8 out of 8 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| R/generate_hub_baselines.R | New module implementing baseline forecast generation with data latency checks |
| R/generate_hub_ensemble.R | New module implementing ensemble forecast creation and aggregation |
| R/update_hub_target_data.R | Updated to use forecasttools::write_tabular_file instead of readr::write_csv |
| DESCRIPTION | Added new dependencies for forecasting packages and removed readr |
| NAMESPACE | Exported the two new main functions |
| man/*.Rd | Generated documentation files for the new functions |
Tip: Customize your code reviews with copilot-instructions.md. Create the file or learn how to get started.
|
Created #12 for adding tests |
Co-authored-by: Dylan H. Morris <[email protected]>
dylanhmorris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Looks like some of my earlier suggestions weren't applied. Did you mean to reject them @sbidari? Or has my GH just not updated?
I think they posted late. I am just seeing them now |
Co-authored-by: Dylan H. Morris <[email protected]>
R/generate_hub_ensemble.R
Outdated
| if (!disease %in% c("covid", "rsv")) { | ||
| stop("'disease' must be either 'covid' or 'rsv'") | ||
| } |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Redo via checkmate as in the baseline function?
dylanhmorris
left a comment
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
LGTM!
- A few more minor suggestions for consistency
- Not for this PR, but using the
ext =argument tofs::pathmeans that in a future PR we could make the save file format configurable to anythingwrite_tabularsupports (i.e. (csv, tsv, parquet))
Co-authored-by: Dylan H. Morris <[email protected]>
Co-authored-by: github-actions[bot] <41898282+github-actions[bot]@users.noreply.github.com>
closes #4 and #5