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

Implement a proposed modular API to specify a data (i.e. case) generating process #39

Merged
merged 7 commits into from
Feb 15, 2024

Conversation

SamuelBrand1
Copy link
Collaborator

@SamuelBrand1 SamuelBrand1 commented Feb 14, 2024

This PR introduces the modular API to the data generating process discussed in #38 .

Major additions

Diagrammatically, the "modules" (in workflow rather than Julia sense) that are implemented are below. Dotted lines fill in the currently unimplemented steps.

Unit tests are in test scripts here.

A script to run in TestDev mode which demonstrates the currently implemented steps is here.

Minor additions

  • Made the RW distributional test slightly more precise
  • Moved the random walk default priors from a const object to a simple construction function

Missing feature

I have not implemented docstrings in some functions here ahead of addressing #35

flowchart TD

    A["Underlying dists.
---------------------
EpiData"]

    B["Choice of target 
for latent process
---------------------
DirectInfections
    ExpGrowthRate
    Renewal"]

C["Observational Data
---------------------
Obs. cases y_t"]
D["Latent processes
---------------------
Random Walk"] 
E[Turing model constructor]
F["Latent Process priors"]
G[Posterior draws]
H[Posterior checking]
I[Post-processing]
DataW[Data wrangling and QC]

    A --> EpiModel
    B --> EpiModel
    EpiModel -->E
    C-->E
    D-->|random_walk| E
F-->|default_rw_priors|E
E-.->|sample...NUTS...| G
G-.->H
H-.->I
DataW-.->C
Loading

Closes #38
Closes #15

EpiAware/src/epimodel.jl Outdated Show resolved Hide resolved
Copy link
Collaborator

@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 looks really nice. It feels a little still like there is a mixture of styles going on here for the different parts of the model (as in the issue) it would be great to have a little more clarity on that.

I think we might be best places though to review this design as it stands and then do another round if issue/PR iteration?

I've only sight read for now so will circle back once I have looked over the code locally.

EpiAware/src/epimodel.jl Outdated Show resolved Hide resolved
EpiAware/src/latent-processes.jl Show resolved Hide resolved
EpiAware/src/latent-processes.jl Show resolved Hide resolved
EpiAware/src/models.jl Show resolved Hide resolved
EpiAware/src/models.jl Show resolved Hide resolved
Copy link
Collaborator

@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 think this is good to go once issues have been resolved (i.e. moved to issues) as is. I do think there is a bit more conversation to be had about the precise modular construction of the model but I think we can iterate on this over time and should move on to postprocessing and formulating the different models likely first.

@seabbs seabbs merged commit 22a5f5d into main Feb 15, 2024
2 checks passed
@seabbs seabbs deleted the 38-modular-inference branch February 15, 2024 13:41
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
2 participants