-
Notifications
You must be signed in to change notification settings - Fork 7
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
Store PopulationSizeHistory as a json list #274
Comments
Sorry - forgot to ping @nspope : mainly a question for him. |
I think this is a good idea! Not too large, it should be two smallish 1D arrays of breakpoints and sizes respectively. |
One problem is that we can't store a Python class in the JSON format required by the provenance spec. One way around this, as long as we are content with piecewise population size changes (I'm not sure if this is valid for variational inference) would be to allow the
which would be equivalent to
Then either invocation would result in a provenance like
What do you think @nspope ? Is it too ugly allowing a list of lists as an additional |
Or actually, it might be clearer as a dictionary that is unpacked into the
saved in provenance as
|
I think the dict option is cleaner. Wrt how variable population size interfaces with the variational algorithm-- it should work perfectly fine with the current implementation. This might change depending on how the prior calibration is fixed (still a work in progress). |
It would be nice to store the passed-in PopulationSizeHistory object in the provenance of a tsdated tree sequence. I don't think it is a very large object, right? It just consists of 2 arrays, neither of which is likely to be millions of numbers long. Any reason why not to store it?
The text was updated successfully, but these errors were encountered: