Breaking change: require pypfilt >= 0.8.0, which introduces a number of major changes. See the pypfilt change log for further details.
Enhancement: when forecast scenarios fail,
epifx-forecastnow informs the user which scenarios failed.
epifx-forecastrequires at least one scenario file. Previously,
epifx-forecastwould run no simulations and return successfully if no scenario files were provided. This is unlikely to be useful behaviour, and it now complains that a required argument is missing.
epifx-forecastnotifies the user when an estimation pass has no associated forecast dates, in case the user intended to run one or more forecast simulations.
epifx-forecastlogs the scenario identifier before running each scenario instance.
Documentation: replace the “Getting Started” guide with separate sections for all of the individual parts that
epifxadds to the base
Documentation: add an example for each summary table.
This release introduces major improvements and simplifications. Similar to the 0.6.0 release, this involves some structural changes and breaks backwards compatibility with earlier releases. Key changes include:
Breaking change: require Python 3.7 or newer.
Breaking change: require pypfilt >= 0.7.0, which introduces a number of major changes. See the pypfilt change log for further details.
Breaking change: use the
epifx-forecastcommand to run forecasts using scenarios defined in TOML files. Note that its command-line arguments have changed. This command can now be used to run estimation passes.
Breaking change: all of the previously-provided
epifx-xxxcommands have been removed.
epifx.obs.Obshas been removed, all
epifxobservation models now derive from
epifx.obs.SampleCountshas been renamed to
epifx.obs.SampleFractionnow support observation parameters in the state vector.
epifx-forecastnow allows the user to specify a forecast identifier with the
--idargument, which can replace the forecast date in the output file name.
pyproject.toml(PEPs 517 and 518).
Bug fix: handle peak size and time statistics for peaks of zero cases.
This release introduces major structural changes to the entire package. Please see the online documentation for further details. The major user-facing changes are:
Breaking change: drop support for Python 2, require Python 3.6 or newer.
Breaking change: forecast scenarios are now defined in TOML files.
Breaking change: use the new
epifx-decl-fscommand to run forecasts.
Breaking change: the previous
epifx-xxxcommands have not been updated to work with the new TOML forecast scenarios, and are not currently supported. They will be updated in a future release.
epifx.obs.PopnCountnow supports incomplete observations that comprise an incomplete count and an estimated upper bound for the true value.
Enhancement: add an SEEIIR model, which has the same parameters as the SEIR model.
Enhancement: observation upper bounds can now be treated as point estimates by setting
params['epifx']['upper_bounds_as_obs'] = True.
epifx-replaycan now define “perfect” upper bound estimates (corresponding to the observed values in the most recent data snapshot) by using the
epifx.cmd.run_in_parallelnow returns the job completion status (Boolean value).
Test cases are now run against Python 3.6 rather than Python 3.5, since Debian Testing has migrated to Python 3.6.
This release requires pypfilt >= 0.5.4.
Bug fix: correctly calculate the time of first infection relative to the true start of the simulation period (
params['epoch']) rather than, e.g., the start of the forecasting run.
Bug fix: ignore duplicate table rows when generating JSON files.
Bug fix: additional data validation checks when generating JSON files.
Enhancement: add a new command (
epifx-replay) that replays the observations from an existing set of forecasts, so that new forecasts can be generated while accounting for, e.g., incomplete observations.
Enhancement: add a worked example of generating forecasts. See the “Worked Example” page in the online documentation.
Bug fix: when processing forecast files that only contain estimation runs, the
epifx-jsoncommand will ignore forecast credible intervals prior to the date of the most recent observation.
Bug fix: ensure
epifx-jsonuses native strings for dtype field names.
Bug fix: remove invalid import statements that rely on an as-yet unreleased version of
Enhancement: add a new monitor,
epifx.summary.ThresholdMonitor, and a corresponding table,
epifx.summary.ExceedThreshold, for detecting when the expected observations for each particle exceed a specific threshold. Note that this table is not included in the default summary object returned by
epifx-jsoncommand no longer aborts if a forecast file only contains forecast credible intervals (the
forecaststable) but not the peak timing credible intervals (the
epifx-jsoncommand will generate output from estimation runs if a forecast file only contains an estimation run (which can occur, e.g., when directly using
pypfilt.runto generate forecasts rather than using
Bug fix: the accept-reject sampler now resets particle weights after each iteration. This only affects summary tables that require the weights to sum to unity, it has no effect on the particle selection.
Bug fix: the daily forcing signal now correctly returns datetime instances.
Bug fix: add a missing function argument when processing incomplete observations.
epifx-forecastcommand now accepts a new argument,
-a), which generates forecasts for all defined locations.
This release requires pypfilt >= 0.5.1.
epifx.default_paramsmakes fewer assumptions, and now takes more positional arguments.
Breaking change: the SEIR model is now defined in terms of intrinsic parameters (e.g., R0 rather than the daily force of infection) and the time of initial exposure is now just another model parameter.
Breaking change: record predictive CIs in the
/data/forecaststable; by default, the median and the 50% and 95% credible intervals are recorded. The expected observation CIs are now stored in the
Breaking change: record observations in tables grouped by the observation unit; these tables are now located in HDF5 tables
Bug fix: ensure that
epifx.summary.ObsLikelihoodcorrectly encodes the observation source and units.
Bug fix: robustly handle near-zero probability mass.
Enhancement: arbitrary model priors are supported via the accept-reject sampler provided by the
Enhancement: a suite of commands for performing retrospective observation model scans and live forecasts are provided by the
epifx.cmdmodule. See the documentation for details.
Enhancement: an example template is provided (see the
epifx.examplemodule and the
epifx-templatecommand) that includes Australian Google Flu Trends data. Observations can be loaded with
epifx.summary.PeakMonitornow surveys the entire particle trajectory (including both the estimation and forecasting runs) so that peaks that occurred prior to the forecasting date are reported correctly.
epifx.summary.ObsLikelihoodtable can now record the likelihood of arbitrary observations (i.e., observations that were not included in the filtering process).
Enhancement: the default summary tables provided by
epifx.summary.makecan be suppressed as needed.
Enhancement: custom simulation time scales are supported.
Enhancement: add quantile and probability mass sum functions to the observation models.
Enhancement: test cases for several modules are now provided in
./testsand can be run with tox.
Enhancement: document the release process and provide instructions for uploading packages to PyPI.
This release requires pypfilt >= 0.4.3.
Breaking change: the
epifx.obs.SampleCountsobservation model now uses a Beta-binomial distribution rather than a Beta distribution. Parameter names and definitions have been changed accordingly.
Enhancement: consistently separate Unicode strings from bytes, and automatically convert NumPy field names into native strings.
Enhancement: add support for incomplete data for which there may or may not be an upper bound (whether known in fact or estimated).
Enhancement: record the likelihood of each observation according to each particle (see the
Breaking change: replace the observation models added in epifx 0.4.1 with observations models for:
Count data where the denominator is known or assumed to be the entire population (
Count data where the denominator is reported and may vary, and where the background signal is a fixed proportion (
Enhancement: provide generic negative binomial observation models for count data and for fractional/percentage data in
This release requires pypfilt >= 0.4.0.
Breaking change: models must define default parameter bounds by implementing the
Breaking change: model expectation functions now receive the previous and current state vectors, in addition to the infection probability vector. This means that expectation functions will need to change from:
expect(params, unit, period, pr_inf)
expect(params, unit, period, pr_inf, prev, curr)
epifx.summary.makenow passes additional keyword arguments to the
pypfilt.summary.HDF5constructor, allowing users to override default settings, such as
Bug fix: ensure that infection probabilities are strictly non-negative.
Bug fix: ensure that population invariants are enforced correctly.
Bug fix: correctly scale the daily seeding probability.
Add instructions for installing epifx in a virtual environment.
Bug fix: prevent a runtime error with
params['epifx']['one_prng'] = Trueby correctly retrieving the pypfilt PRNG (
This release requires pypfilt >= 0.3.0.
Provide each summary statistic as a separate class.
Inherit from the pypfilt simulation model base class.
Host the documentation at Read The Docs.
Use an independent PRNG instance for model stochasticity, as distinct from the pypfilt PRNG instance (used for resampling). Note that this breaks backwards compatibility (in terms of producing identical outputs) and can be overridden by setting
params['epifx']['one_prng'] = True.
This release requires pypfilt >= 0.2.0.
Fix a bug where temporal forcing could cause a negative force of infection.
Add support for temporal forcing, modulated by the new parameter sigma.
Update the model parameter invariants for alpha, based on the priors for R0 and gamma.
Sample R0 and calculate alpha, rather than sampling alpha directly.
Avoid error messages if no logging handler is configured by the application.
Default to comparing only the simulation outputs and ignore the metadata; this can be overridden by the
Build a universal wheel via
python setup.py bdist_wheel, which supports both Python 2 and Python 3.
This release requires pypfilt >= 0.1.2.
Record credible intervals for state variables (
Reduce the minimum latent period to half a day.
No longer require the simulation period to be included in the simulation parameters dictionary.
Hide stderr output from spawned processes when obtaining git metadata, since the error messages have no relevance to the user (they only serve to indicate that the working directory is not part of a git repository).
Obtain git metadata from the working directory, if it is contained within a repository. This requires pypfilt >= 0.1.1.
Note that sensible metadata will only be obtained if the working directory is not manipulated by program code (e.g.,
Record the enforced limits on model parameters, so that output files include sufficient information to independently produce identical results.
The default limits on
gammaare now identical to the domain of their default priors (1 to 3 days).
Ignore the command line (
/meta/sim/cmdline) when comparing output files.
Added a script (
cmp-output) that compares output files for identical simulation outputs and metadata.