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

Tutorial: generating parameters from priors in msprime #42

Open
jeromekelleher opened this issue Oct 9, 2019 · 7 comments
Open

Tutorial: generating parameters from priors in msprime #42

jeromekelleher opened this issue Oct 9, 2019 · 7 comments
Assignees

Comments

@jeromekelleher
Copy link
Member

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.

Pinging @gtsambos (@agladstein mentioned you were interested in this)

@gtsambos
Copy link
Member

gtsambos commented 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
Copy link
Member

gtsambos commented 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
Copy link
Member

agladstein commented 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
Copy link
Member Author

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
Copy link
Member Author

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
Copy link
Member

Shall we migrate this issue to the "tutorials" repo?

Assuming https://github.com/tskit-dev/tutorials is also for msprime tutorials, then yes!

@jeromekelleher jeromekelleher transferred this issue from tskit-dev/msprime Jan 28, 2021
@jeromekelleher jeromekelleher changed the title Docs: add tutorial for generating events from priors Tutorial: generating parameters from priors in msprime Jan 28, 2021
@jeromekelleher
Copy link
Member Author

Transferred from msprime. This would be a good tutorial.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

3 participants