Skip to content

Default epsilon is occasionally too small #483

@nspope

Description

@nspope

In edge cases (e.g. with a single EP iteration) the epsilon used to force positive branch lengths is too small, and gets lost due to floating point error, causing the subsequent tables.sort() to error out. In general, a "safe" lower bound for epsilon is going to depend on the mutational clock & time scale: that is, if the mutation rate is very low and/or population size very large then we might run into issues even outside edge cases.

It would be nice to (1) document the eps argument somewhere so it's more clear how to work around issues like this (and maybe rename it to be clearer; something like min_branch_length); (2) if eps falls below the minimum floating point difference for a particular edge length, use a larger value (but still small in relative terms) so that we don't error out.

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