You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
{{ message }}
Repository navigation
Tutorial: generating parameters from priors in msprime #42
People often need to run simulations with parameters drawn from some distribution. Add a simple example of this to the tutorial. Include an example where we draw times from a distribution and we sort the list by time after generation to ensure they're in the right order.
Hi Jerome, yes, I have some code that does this and I'd be happy to put up something on the tutorial somewhere. (perhaps while I do this general revamp of the tutorial) -- happy to be assigned to this task.
There's a simple and a complicated case to consider here. The simple case is when all the priors are independent of each other -- then this is fairly easy.
In practice though, most parameters in demographic models will have some dependencies and the priors are represented by a DAG. For example, if a source population is 'created' by a MassMigration event from a destination population at some time, any other demographic times relating to the history of this source population must be later than this time. In my own code, I've found it useful to create some checks of consistency before I run a simulation with the parameters.
Btw - we have enough documentation-related tasks that it might be worth opening a Project to collate them all, I think? I don't know how far the msprime 2.0 paper is from publication, but I think it would be wonderful to have shiny new docs ready for this occasion ✨
Great, thanks @gtsambos and @agladstein --- can you coordinate with each other on this please? We'll want the simple version definitely, and if the complicated version is generally useful and won't take up too much space then that sounds good too.
Good call on the project, I've made it "1.0 Documentation".
changed the title [-]Docs: add tutorial for generating events from priors[/-][+]Tutorial: generating parameters from priors in msprime[/+]on Jan 28, 2021
Activity
gtsambos commentedon Oct 9, 2019
Hi Jerome, yes, I have some code that does this and I'd be happy to put up something on the tutorial somewhere. (perhaps while I do this general revamp of the tutorial) -- happy to be assigned to this task.
There's a simple and a complicated case to consider here. The simple case is when all the priors are independent of each other -- then this is fairly easy.
In practice though, most parameters in demographic models will have some dependencies and the priors are represented by a DAG. For example, if a source population is 'created' by a MassMigration event from a destination population at some time, any other demographic times relating to the history of this source population must be later than this time. In my own code, I've found it useful to create some checks of consistency before I run a simulation with the parameters.
gtsambos commentedon Oct 9, 2019
Btw - we have enough documentation-related tasks that it might be worth opening a Project to collate them all, I think? I don't know how far the msprime 2.0 paper is from publication, but I think it would be wonderful to have shiny new docs ready for this occasion ✨
agladstein commentedon Oct 9, 2019
I think we can just start with the simple version.
And I also have code that does this, or can whip something up.
jeromekelleher commentedon Oct 9, 2019
Great, thanks @gtsambos and @agladstein --- can you coordinate with each other on this please? We'll want the simple version definitely, and if the complicated version is generally useful and won't take up too much space then that sounds good too.
Good call on the project, I've made it "1.0 Documentation".
jeromekelleher commentedon Nov 3, 2020
This sounds like a topic much more suited to the "tskit tutorials" site. See proposal here: #10
Shall we migrate this issue to the "tutorials" repo?
agladstein commentedon Nov 3, 2020
Assuming https://github.com/tskit-dev/tutorials is also for msprime tutorials, then yes!
[-]Docs: add tutorial for generating events from priors[/-][+]Tutorial: generating parameters from priors in msprime[/+]jeromekelleher commentedon Jan 28, 2021
Transferred from msprime. This would be a good tutorial.