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
While working on #248 I noticed that the "discretized" priors for older nodes generally have moments that are less than their undiscretized counterparts. Currently, the way the timegrid is constructed is from evenly spaced quantiles of the undiscretized prior. This results in discretized priors that underestimate the upper tail, especially when there's a demographic history that "stretches" the time distribution.
It's probably possible to come up with a heuristic that samples the upper tail more densely, but an alternative would be to choose the timepoints so that the discretized priors have moments that are as close as possible to the originals. One way to do this would be to treat it as an optimization problem for the differences between adjacent timepoints, where the loss criterion is something like squared error between discretized/undiscretized moments, and each observation is the prior for a node. This would also enforce a hard constraint on the number of timepoints, which might be necessary if the demographic history is allowed to vary across nodes (b/c the union-of-quantiles approach won't be able to "thin" as effectively).
The text was updated successfully, but these errors were encountered:
I played around with this idea a little bit -- seems like a no-go, as it takes awhile and doesn't seem to improve inference at all. Instead, modifying the upper timepoint as in #233 seems to have much more of impact (interestingly, #233 biases the moments upwards, but improves posterior inference).
While working on #248 I noticed that the "discretized" priors for older nodes generally have moments that are less than their undiscretized counterparts. Currently, the way the timegrid is constructed is from evenly spaced quantiles of the undiscretized prior. This results in discretized priors that underestimate the upper tail, especially when there's a demographic history that "stretches" the time distribution.
It's probably possible to come up with a heuristic that samples the upper tail more densely, but an alternative would be to choose the timepoints so that the discretized priors have moments that are as close as possible to the originals. One way to do this would be to treat it as an optimization problem for the differences between adjacent timepoints, where the loss criterion is something like squared error between discretized/undiscretized moments, and each observation is the prior for a node. This would also enforce a hard constraint on the number of timepoints, which might be necessary if the demographic history is allowed to vary across nodes (b/c the union-of-quantiles approach won't be able to "thin" as effectively).
The text was updated successfully, but these errors were encountered: