0.1.6
[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 usingreturn_posterior
. Thenormalize
terminology previously used
inget_dates
is changed tostandardize
to better reflect the fact that the
maximum (not sum) is one, and exposed via theoutside_standardize
parameter. -
The
Ne
argument todate
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 withmethod="inside_outside"
previously returned a dict that included keysstart_time
andend_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, sostart_time
andend_time
have been
replaced by a single keytime
. -
The
return_posteriors=True
option withmethod="maximization"
is no
longer accepted (previously simply returnedNone
) -
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 thedemography.PopulationSizeHistory
class. The
population_size
argument todate
accepts either a single scalar effective
population size, or aPopulationSizeHistory
instance. -
Added support and wheels for Python 3.11
-
The
.date()
function is now a wrapper for the individual dating methods
(accessible usingtsdate.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 aPopulationSizeHistory
instance) -
preprocess_ts
always records provenance as being from thepreprocess_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[]