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 calculate processes function to pipeline #314

Merged
merged 11 commits into from
Jul 1, 2024
Merged

Conversation

SamuelBrand1
Copy link
Collaborator

This PR adds a function that calculates the three process targets for inference:

  • log incidence
  • exponential growth rate
  • (Instantaneous) reproduction number.

Adds a simple rt calculation, and wraps EpiAware.expected_Rt, but with left truncation effect dealt with backwards exponential growth according to first value of rt.

Closes #116

@SamuelBrand1 SamuelBrand1 requested a review from seabbs June 28, 2024 13:10
@codecov-commenter
Copy link

codecov-commenter commented Jun 28, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.18%. Comparing base (788ddce) to head (33f60a5).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #314   +/-   ##
=======================================
  Coverage   93.18%   93.18%           
=======================================
  Files          50       50           
  Lines         528      528           
=======================================
  Hits          492      492           
  Misses         36       36           

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

@seabbs seabbs enabled auto-merge June 28, 2024 13:21
@seabbs seabbs force-pushed the add-predicted-quantities branch from b3acecf to cd4f16c Compare June 28, 2024 14:07
@SamuelBrand1
Copy link
Collaborator Author

I've kept the functionality the same here, but added an internal method for seeding the infections. The backwards exponential is now a default dispatching on the pipeline type. This should make it easier to address new functionality later as flagged by @seabbs .

@SamuelBrand1 SamuelBrand1 requested a review from seabbs June 28, 2024 15:58
Copy link
Contributor

@seabbs seabbs left a comment

Choose a reason for hiding this comment

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

Good idea

@seabbs seabbs added this pull request to the merge queue Jun 28, 2024
@github-merge-queue github-merge-queue bot removed this pull request from the merge queue due to failed status checks Jun 28, 2024
@SamuelBrand1 SamuelBrand1 requested a review from seabbs July 1, 2024 10:31
@seabbs seabbs added this pull request to the merge queue Jul 1, 2024
Merged via the queue into main with commit 3624ca0 Jul 1, 2024
10 checks passed
@seabbs seabbs deleted the add-predicted-quantities branch July 1, 2024 10:56
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.

Function to backcalculate Rt and the growth rate
3 participants