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

New scenario types and associated make_Rt methods #327

Merged
merged 6 commits into from
Jul 5, 2024
Merged

Conversation

SamuelBrand1
Copy link
Collaborator

This PR does two things:

  • It creates an abstract type for Rt without renewal scenarios, and creates a set of concrete sub types aimed at setting the scenario behaviour (the scenarios are discussed in Flesh out multiple simulated scenarios vs one long one #52 ).
  • It creates a set of make_Rt methods which determine the Rt time series set by the scenario along with docstring examples of how to plot the decision for visual inspection.

As well as extension of unit tests to cover the new structs and functions.

NB: I've taken the definition of "endemic" to mean a geometric mean of $R_t$ over the time period is unity,

$$\Big(\prod_{t=1}^n R_t \Big)^{1/n} = 1.$$

This approximately ensures a time average stationarity in cases, i.e. stable endemicity.

Closes #325 and #326 .

@SamuelBrand1 SamuelBrand1 requested a review from seabbs July 3, 2024 09:29
@codecov-commenter
Copy link

codecov-commenter commented Jul 3, 2024

Codecov Report

All modified and coverable lines are covered by tests ✅

Project coverage is 93.18%. Comparing base (849b707) to head (3275c6f).

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #327   +/-   ##
=======================================
  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.

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.

I'd missed you were PR stacking so review comments on the other PR are mostly for here I think

@SamuelBrand1 SamuelBrand1 requested a review from seabbs July 5, 2024 11:02
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.

This all looks good to me.

@seabbs seabbs enabled auto-merge July 5, 2024 11:03
@SamuelBrand1
Copy link
Collaborator Author

PR context

From f2f conversation @seabbs is a bit uncomfortable that we essentially have two patterns here:

  • A type-dispatch type pattern for setting the "truth data" configuration (e.g. endemic vs non-endemic etc).
  • A list of Dicts that specify the configurations of the inference models applied to each "truth data" model.

My argument is that because there are a small(ish) number of "truth data" scenarios we are considering, this is clearer/easier at the moment but we should consider a trait-based system to ship with an EpiAwarePipeline package (#229 ), for example have a trait for endemic truth scenarios which can have types added to it dynamically by the user to define a workflow (see SimpleTraits.jl for implementation).

NB: the truth data scenarios still contain a list of Dicts specifying the GI because the analysis extends to the effect of GI mis-specification.

@seabbs seabbs added this pull request to the merge queue Jul 5, 2024
Merged via the queue into main with commit ff104c4 Jul 5, 2024
10 checks passed
@seabbs seabbs deleted the pipeline-scenarios branch July 5, 2024 11:50
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.

Add scenario types to pipeline to specify the desired scenario.
3 participants