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

[Feature request]: project from inference results #439

Open
pearsonca opened this issue Jan 3, 2025 · 1 comment
Open

[Feature request]: project from inference results #439

pearsonca opened this issue Jan 3, 2025 · 1 comment
Labels
enhancement Request for improvement or addition of new feature(s). gempyor Concerns the Python core. medium priority Medium priority. post-processing Concern the post-processing.

Comments

@pearsonca
Copy link
Contributor

pearsonca commented Jan 3, 2025

Label

config, gempyor

Priority Label

medium priority

Is your feature request related to a problem? Please describe.

Users requested the ability to just be able to project from inference results, ideally using the same config that one could also project from before having done an inference operation.

Is your feature request related to a new application, scenario round, pathogen? Please describe.

Forecasting from any kind of synthetic posterior (such as was needed for SMH flu 2024) needs something like this capability.

Describe the solution you'd like

For a hypothetical configuration file (maybe a new approach to syntax like this or sticking with the currenter more involved syntax this reflects):

parameter:
  a: ~unif(min=0, max=1)
  b: ~normal(mean=5, sd=0.1)
  c: 0.5

inference:
  targets: [a, b]
  • simulating without doing inference should take a value draw for a, b (and c, but its drawn value is always the same).
  • inference should know its varying a, b AND should use the distribution as a prior
  • if asking to simulate after inference has been run, it should refer to the inference results for a and b
  • ...but also there should be someway to do simulation using the priors (or some other value to override inference results)

So:

$ flepimop simulate config.yml # does simulation from priors, with some expected stochastic behavior
$ flepimop calibrate config.yml # does inference with priors, and as a side effect writes inference results
$ flepimop simulate config.yml # now does simulation from priors
$ flepimop simulate config.yml --ignore-inference # ... or some such, to simulate as if no posterior available

Not clear if we should do this before or after general overhaul of parameter specification (#437).

Thoughts @saraloo @MacdonaldJoshuaCaleb @alsnhll?

@TimothyWillard TimothyWillard added enhancement Request for improvement or addition of new feature(s). gempyor Concerns the Python core. post-processing Concern the post-processing. medium priority Medium priority. labels Jan 10, 2025
@pearsonca
Copy link
Contributor Author

pearsonca commented Jan 13, 2025

This is related to, but distinct from: #416.

Earlier conversation at dev meeting 13 Jan, suggests something like

$ flepimop calibrate someconfig.yml
$ flepimop calibrate --render=posterior someconfig.yml
$ # or maybe flepimop process someconfig.yml --target=posterior

where the first version is sampling only and "only" produces the intermediate fitting outputs, and the second version (or something similar) gives the best possible (based on available calibration results) posterior object, which can then be used for projection.

Similarly in #416, the idea would be to produce via other ad hoc / manual means something that complies with the spec for an posterior object.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
enhancement Request for improvement or addition of new feature(s). gempyor Concerns the Python core. medium priority Medium priority. post-processing Concern the post-processing.
Projects
None yet
Development

No branches or pull requests

2 participants