[ANN] UnrollingAverages.jl: A Package to Deconvolve Time Series Data

We’re happy to announce UnrollingAverages.jl: a package aimed at deconvolving (or unrolling) moving averages of time series to get the original ones back.

In the following, by “original series” or “series” we are going to mean the time series we would like to reconstruct from its “moving average”.

The package exports a single function called unroll that, with a few simple arguments, is able to handle all the following scenarios.

Scenario 1

The initial values of the moving average provided are known.

In this scenario, the original series can be exactly reconstructed.

Scenario 2

The initial values of the moving average provided are not known, but it is known that the series is exclusively composed of natural numbers;

In this scenario, all possible natural series that correspond to the input moving average are returned.

Scenario 3

The initial values of the moving average provided are not known, and it is not true or known that the series is exclusively composed of natural numbers.

In this scenario, the original series cannot be reconstructed in general, so a pseudo-inverse approximation is returned.

Examples

A real-world custom application of this package can be found in the COVID-19 integrated surveillance data repository we maintain.

The output data has been stored here and contain the following information:

  • Reconstructed daily time series of confirmed cases by date of diagnosis stratified by sex and age at the regional level;

  • Reconstructed daily time series of symptomatic cases by date of symptoms onset stratified by sex and age at the regional level;

  • Reconstructed daily time series of ordinary hospital admissions by date of admission stratified by sex and age at the regional level;

  • Reconstructed daily time series of intensive hospital admissions by date of admission stratified by sex and age at the regional level;

  • Reconstructed daily time series of deceased cases by date of death stratified by sex and age at the regional level.

For more details, please consider taking a look at the documentation.

Discussions, issues and PRs are always welcome!

References

Contacts

Author GitHub Twitter Discourse
Pietro Monticone @pitmonticone @PietroMonticone @PietroMonticone
Claudio Moroni @ClaudMor @Claudio__Moroni @claudio20497
11 Likes