Skip to content

Use moment constraints to choose timepoints for prior? #250

Closed
@nspope

Description

@nspope

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).

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions