Skip to content

Expose count observation process base class; add section to tutorial for custom count observation process#726

Draft
cdc-mitzimorris wants to merge 34 commits intomainfrom
mem_custom_weekly_counts
Draft

Expose count observation process base class; add section to tutorial for custom count observation process#726
cdc-mitzimorris wants to merge 34 commits intomainfrom
mem_custom_weekly_counts

Conversation

@cdc-mitzimorris
Copy link
Copy Markdown
Collaborator

Rename the Count observation process base class from _CountBase to CountBase - which parallels how the Measurements observation process class is set up.

Add a section to tutorial observation_process_counts.qmd showing how to extent the CountBase class for observation data aggregated to the weekly level. This parallels how the Measurements observation process tutorial defines the Wastewater class.

@github-actions
Copy link
Copy Markdown

github-actions bot commented Feb 26, 2026

Thank you for your contribution @cdc-mitzimorris 🚀! Your github-pages is ready for download 👉 here 👈!
(The artifact expires on 2026-04-16T19:11:42Z. You can re-generate it by re-running the workflow here.)

@codecov
Copy link
Copy Markdown

codecov bot commented Feb 26, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.44%. Comparing base (0078fbd) to head (867cb85).

Additional details and impacted files
@@            Coverage Diff             @@
##             main     #726      +/-   ##
==========================================
- Coverage   98.44%   98.44%   -0.01%     
==========================================
  Files          51       51              
  Lines        1675     1673       -2     
==========================================
- Hits         1649     1647       -2     
  Misses         26       26              
Flag Coverage Δ
unittests 98.44% <100.00%> (-0.01%) ⬇️

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.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@cdc-mitzimorris
Copy link
Copy Markdown
Collaborator Author

@dylanhmorris, @damonbayer - ready for review.

@dylanhmorris
Copy link
Copy Markdown
Collaborator

@dylanhmorris tagging for myself that this needs review.

## Using the `Counts` class for Hospital Admissions Data

For hospital admissions data, we construct a `Counts` observation process.
The delay is the key mechanism: infections from $s$ days ago ($I(t-s)$) contribute to today's expected hospital admissions ($\mu(t)$) weighted by the probability ($\pi(s)$) that an infection leads to hospitalization after exactly $s$ days. The convolution sums these contributions across all past days.
Copy link
Copy Markdown
Collaborator

@dylanhmorris dylanhmorris Apr 9, 2026

Choose a reason for hiding this comment

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

Should now be $I(t-d)$ bc of changes in #773, no?

```

## Weekly Observations with WeeklyCounts

Copy link
Copy Markdown
Collaborator

Choose a reason for hiding this comment

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

Flag at the top that Pyrenew provides helper functions and we'll use them here?

Copy link
Copy Markdown
Collaborator

@dylanhmorris dylanhmorris left a comment

Choose a reason for hiding this comment

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

Thanks @cdc-mitzimorris. A few minor suggestions.

@CDCgov CDCgov deleted a comment from mitzimorris Apr 9, 2026
@cdc-mitzimorris
Copy link
Copy Markdown
Collaborator Author

not going to merge at this time - this work will be redone in future PRs to address #777

@cdc-mitzimorris cdc-mitzimorris marked this pull request as draft April 10, 2026 13:12
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.

2 participants