-
Notifications
You must be signed in to change notification settings - Fork 92
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
Vignette on sampling parameter values #1456
Comments
There is some earlier discussion in #299. As far as I can tell, the simplest way to do this currently is to copy/paste/modify a stdpopsim demographic model function to accept and propagate parameters. A single model instance is constructed by calling the model function with desired parameter values and then simulated directly using msprime (or perhaps with the stdpopsim With regard to making an API to do this with stdpopsim directly, here are some random thoughts:
|
Hm - what do you mean that they are static, @grahamgower? Here in a simple example:
... so, I think this should work? It is not ideal as an API, as changing these things actually changes the values in the stdpopsim object: after the above, we have
(Perhaps However, I think the YAML proposal (see #1256) is a much better way to go. |
Ah, ok. I guess parameters can be modified in this way, including modifying events in |
We could use a vignette on sampling parameter values for a given model. For example, how does one easily simulate with various values for a divergence time in a given model?
Several users have requested this functionality, because it can be core for training machine learning models. It will also be useful for generating test data for Ryan's proposed competition.
It's been said that we can do this with the current Python API. A simple example sampling over a single parameter probably suffices to illustrate the principle. Depending on how ugly it is, maybe we'll want to develop a cleaner API for modifying parameters programatically.
The text was updated successfully, but these errors were encountered: