Skip to content

0.1.6

Compare
Choose a tag to compare
@benjeffery benjeffery released this 06 Jan 23:09
· 131 commits to main since this release
e022fd1

[0.1.6] - 2024-01-07

Breaking changes

  • The standalone preprocess_ts function now defaults to not removing unreferenced
    individuals, populations, or sites, aiming to change the tree sequence tables as
    little as possible.

  • get_dates (previously undocumented) has been removed, as posteriors can be
    obtained using return_posterior. The normalize terminology previously used
    in get_dates is changed to standardize to better reflect the fact that the
    maximum (not sum) is one, and exposed via the outside_standardize parameter.

  • The Ne argument to date has been deprecated (although it is
    still in the API for backward compatibility). The equivalent argument
    population_size should be used instead.

  • The CLI -verbosity flag no longer takes a number, but uses
    action="count", so -v turns verbosity to INFO level,
    whereas -vv turns verbosity to DEBUG level.

  • The return_posteriors=True option with method="inside_outside"
    previously returned a dict that included keys start_time and end_time,
    giving the impression that the posterior for node age is discretized over
    time slices in this algorithm. In actuality, the posterior is discretized
    atomically over time points, so start_time and end_time have been
    replaced by a single key time.

  • The return_posteriors=True option with method="maximization" is no
    longer accepted (previously simply returned None)

  • Python 3.7 is no longer supported.

Features

  • A new continuous-time method, "variational_gamma" has been introduced, which
    uses an iterative expectation propagation approach. Tests show this increases
    accuracy, especially at older times. A Laplace approximation and damping are
    used to ensure numerical stability. After testing, the node priors used in this
    method are based on a global mixture prior, which can be refined during iteration.
    Future releases may switch to using this as the default method.

  • Priors may be calculated using a piecewise-constant effective population trajectory,
    which is implemented in the demography.PopulationSizeHistory class. The
    population_size argument to date accepts either a single scalar effective
    population size, or a PopulationSizeHistory instance.

  • Added support and wheels for Python 3.11

  • The .date() function is now a wrapper for the individual dating methods
    (accessible using tsdate.core.dating_methods), which can be called independently.
    (e.g. tsdate.inside_outside(...)). This makes it easier to document method-specific
    options. The API docs have been revised accordingly. Provenance is now saved with the
    name of the method used as the celled command, rather than "command": "date".

  • Major re-write of documentation (now at
    https://tskit.dev/tsdate/docs/), to use the
    standard tskit jupyterbook framework.

Bugfixes

  • The returned posteriors when return_posteriors=True now return actual
    probabilities (scaled so that they sum to one) rather than standardized
    "probabilities" whose maximum value is one.

  • The population size is saved in provenance metadata (as a dictionary if
    it is a PopulationSizeHistory instance)

  • preprocess_ts always records provenance as being from the preprocess_ts
    command, even if no gaps are removed. The command now has a (rarely used)
    delete_intervals parameter, which is normally filled out and saved in provenance
    (as it was before). If no gap deletion is done, the param is saved as []