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

Toy model generate data #33

Merged
merged 13 commits into from
Feb 13, 2024
Merged

Toy model generate data #33

merged 13 commits into from
Feb 13, 2024

Conversation

SamuelBrand1
Copy link
Collaborator

As per Issue #14 and issue #15 it is necessary to have at least one fully defined model.

In this case, each model has two main parts:

  1. A Turing model defining how an underlying infection time series is generated from a latent process, and how the underling infection time series defines the log-likelihood of any observed case data, e.g. after a delay.
  2. Another Turing model defining the latent process, which interacts with the main model via @submodel.

The PR covers defining 1. directly generating infections by exp transforming the latent process, and 2. that latent process is a random walk with random step size variance and random initial condition. This also acts to test the underlying logic of using submodels to create modularity.

Unit tests are here and here.

An example script that runs in TestDev mode is here.

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've just done a sight read and this generally looks good. Overall there is more model structure in log_infections than I was expecting (I thought it would just be a version of EpiModel with a defined map from the latent process to infections but it looks like it has more custom code than that.

Will check out and run in a bit and circle back

@SamuelBrand1
Copy link
Collaborator Author

I've just done a sight read and this generally looks good. Overall there is more model structure in log_infections than I was expecting (I thought it would just be a version of EpiModel with a defined map from the latent process to infections but it looks like it has more custom code than that.

Will check out and run in a bit and circle back

This is actually not a bad suggestion.

If the EpiModel struct also defines the latent process -> underlying infections transformation then we're done.

@seabbs
Copy link
Collaborator

seabbs commented Feb 13, 2024

In a f2f conversation we decided to proceed with this as is and to then open additional issues to improve documentation (#35) and to make the model implementation better show case Julia features and to be more DRY.

@seabbs seabbs enabled auto-merge February 13, 2024 15:45
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.

LGTM - still waiting on an issue for the revised approach to the model framework

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.

LGTM - still waiting on an issue for the revised approach to the model framework

@seabbs seabbs merged commit e786bfb into main Feb 13, 2024
2 checks passed
@seabbs seabbs deleted the toy-model-generate-data branch February 13, 2024 15:46
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