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

Add helper data PyrenewHEWData class to hold input data to PyrenewHewModels #283

Merged
merged 38 commits into from
Jan 18, 2025

Conversation

dylanhmorris
Copy link
Contributor

@dylanhmorris dylanhmorris commented Jan 8, 2025

Main change

Add PyrenewHEWData

This:

  • facilitates date math
  • removes some if is None conditionals from the main model.sample() code.
  • Has a simple to_forecast_data() transformation helper for posterior prediction.

Additional changes:

Copy link

codecov bot commented Jan 8, 2025

Codecov Report

Attention: Patch coverage is 31.66667% with 82 lines in your changes missing coverage. Please review.

Project coverage is 22.14%. Comparing base (bc76d59) to head (4131e81).
Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
pyrenew_hew/pyrenew_hew_data.py 44.77% 37 Missing ⚠️
pyrenew_hew/pyrenew_hew_model.py 20.00% 32 Missing ⚠️
pipelines/build_pyrenew_model.py 0.00% 10 Missing ⚠️
pipelines/generate_predictive.py 0.00% 2 Missing ⚠️
pipelines/fit_pyrenew_model.py 0.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main     #283      +/-   ##
==========================================
+ Coverage   20.67%   22.14%   +1.47%     
==========================================
  Files          21       22       +1     
  Lines        1572     1603      +31     
==========================================
+ Hits          325      355      +30     
- Misses       1247     1248       +1     
Flag Coverage Δ
hewr 47.68% <ø> (ø)
pipelines 0.00% <0.00%> (ø)
pyrenew_hew 24.53% <35.51%> (+5.27%) ⬆️

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link
Collaborator

@sbidari sbidari left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This looks mostly good to me. Just few comments/questions for clarification.

pyrenew_hew/pyrenew_hew_model.py Outdated Show resolved Hide resolved
pyrenew_hew/pyrenew_hew_model.py Outdated Show resolved Hide resolved
pyrenew_hew/pyrenew_hew_model.py Outdated Show resolved Hide resolved
pyproject.toml Outdated Show resolved Hide resolved
@damonbayer damonbayer self-requested a review January 13, 2025 18:11
Copy link
Collaborator

@damonbayer damonbayer left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Left many comments, none of which are mandatory.

@dylanhmorris dylanhmorris enabled auto-merge (squash) January 18, 2025 17:25
@dylanhmorris dylanhmorris merged commit 724d09b into main Jan 18, 2025
16 checks passed
@dylanhmorris dylanhmorris deleted the dhm-fit-to-real-data branch January 18, 2025 17:31
damonbayer added a commit that referenced this pull request Jan 22, 2025
commit 724d09b
Author: Dylan H. Morris <[email protected]>
Date:   Sat Jan 18 17:31:57 2025 +0000

    Add helper data `PyrenewHEWData` class to hold input data to `PyrenewHewModel`s (#283)

commit bc76d59
Author: Subekshya Bidari <[email protected]>
Date:   Fri Jan 17 14:18:11 2025 -0500

    add subpopulation to LatentInfectionProcess (#282)

commit a70e296
Author: Subekshya Bidari <[email protected]>
Date:   Wed Jan 15 15:29:44 2025 -0500

    add setup-r (#295)
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

Successfully merging this pull request may close these issues.

3 participants