-
Notifications
You must be signed in to change notification settings - Fork 4
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
consider features that are useful for inference #89
Comments
Some examples of schemes currently used to specify demographic model parameters (for inference or simulation generally). Feel free to edit this post (and maybe comment to ping folks about an update).
|
https://www.yaml.info/learn/index.html#config highlights how Github Actions workflow YAML files use time_units: generations
variables:
- {name: N0, lower: 50, upper: 1000}
- {name: T0, lower: 100, upper: 200}
demes:
- name: A
epochs:
- end_time: ${{ T0 }}
start_size: ${{ N0 }}
- end_time: 0
start_size: ${{ 10 * N0 }} And maybe allowing non-free parameters to refer to other parameters: time_units: generations
variables:
- {name: N0, lower: 50, upper: 1000}
- {name: T0, value: ${{ 5 * N0 }} }
demes:
- name: A
epochs:
- end_time: ${{ T0 }}
start_size: ${{ N0 }}
- end_time: 0
start_size: ${{ 10 * N0 }} The idea here would be that a static Demes model could be constructed from such a "template" (E.g. using pyparsing to parse the expression minilanguage). I'm not convinced we want to have such a thing in the Demes spec, but I can certainly imagine having a python library that implements this. |
There's no reason we need to be thinking about our own solution, or about YAML either. The desire to have some kind of templating framework for serialised data seems to be a fairly widespread phenomenon. Check out Jsonnet, a turing-complete templating language that is also an extension to JSON! |
We've discussed this in various places. Here are the obvious links I found.
popsim-consortium/demes-python#63
popsim-consortium/demes-paper#3
The text was updated successfully, but these errors were encountered: