-
Notifications
You must be signed in to change notification settings - Fork 6
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
Paragraph arguing for fixed-parameter yaml files #3
Comments
Thanks @jeromekelleher, that's a nice summary. Regards your last point, I would note that each value specified in the yaml has a unique "key". E.g. |
Would it be possible to have a field (such as initial_size_label: First, many models are defined using such variable names in the literature. These labels would typically be entered as comments in the model, for readability. Having an explicit field for this, even optional, would make things more consistent. Second, this would make it easier for users to define optimization functions and manipulate the model.
This tells Moments that the end time of the 0th epoch of the ancestral deme has label TA. The optimizer can then define reasonably readable functions to manipulate the model, as suggested by @grahamgower (e.g., draw parameters from a distribution, or define functional relationships between the parameters). But the bit of code above is cryptic and bug-prone. If it could be replaced with a single, clear entry in the demes yaml, I would think it preferable. |
We've agreed to add a time_units: generations
metadata:
params:
- N0: demes[0].epochs[0].start_size
- N1: demes[0].epochs[1].start_size
- T: demes[0].epochs[0].end_time
demes:
- name: deme1
epochs:
- {end_time: 400.0, start_size: 500.0}
- {end_time: 0, start_size: 100.0} This does look similarly error prone though. It's probably better to include such params metadata "closer" to the field itself, as below. The application software would be responsible for ensuring there are no duplicated parameter names across the different metadata fields. time_units: generations
demes:
- name: deme1
epochs:
- end_time: 400.0
start_size: 500.0
metadata:
params:
- N0: start_size
- T: end_time
- end_time: 0.0
start_size: 100.0
metadata:
params:
- N1: start_size Honestly though, I don't see this as a long-term solution. But maybe its time to open an issue in the spec repository to discuss this further? |
Sorry, I did not understand the the metadata could be used this way. This would work fine for my purposes. Happy to continue the discussion on spec! |
Another point to make in this section of the paper: even if we did choose to include inference-related features and make the format non-static, we cannot adequately cater for inference applications where non-Demes parameters (such as recombination rate) are going to be jointly estimated with the demography. |
The discussion around whether the yaml format should allow for distributions of parameters in the demes repo was quite useful:
popsim-consortium/demes-python#63
The conclusion (IMO) is that the yaml should be seen as a concise and precise way of describing a single, fully specified realisation of a demographic model. Adding the ability to specify distributions on the various estimated parameters is at first attractive, but as you look into the details it actually solves very little while hugely complicating the specification of the models and the implementation of parsers for the demes-yaml format.
Some high-level points to make:
The one thing that's a bit unsatisfactory is that there's no way for inference methods that do output a model that consists of point estimates to indicate uncertainty around those values. I guess we could add some optional fields for each parameter value to describe this uncertainty, which simulators would typically ignore?
The text was updated successfully, but these errors were encountered: