Skip to main content

A library for evaluating the time irreversibility of time series

Project description

Irreversibility Tests Library

The assessment of time irreversibility is the assessment of the lack of invariance of the statistical properties of a system under the operation of time reversal. As a simple example, suppose a movie of an ice cube melting in a glass, and one with the ice cube forming from liquid water: an observer can easily decide which one is the original and which the time-reversed one; in this case, the creation (or destruction) of entropy is what makes the process irreversible. On the other hand, the movement of a pendulum and its time-reversed version are undistinguishable, and hence the dynamics is reversible.

Irreversible dynamics have been found in many real-world systems, with alterations being connected to, for instance, pathologies in the human brain, heart and gait, or to inefficiencies in financial markets. Assessing irreversibility in time series is not an easy task, due to its many aetiologies and to the different ways it manifests in data.

This is a library that will (hopefully) make your life easier when it comes to the analysis of the irreversibility of real-world time series. It comprises a large number of tests (not all existing ones, but we are quite close to that); and utilities to simply the whole process.

This library (v1.1) is described in the paper:

M. Zanin irreversibility: A Python Package for Assessing and Manipulating the Time Irreversibility of Real-World Time Series. Entropy, 27(11), 1146. https://doi.org/10.3390/e27111146

If you are interested in the concept of irreversibility, you may start from our papers:

M. Zanin, D. Papo. Tests for assessing irreversibility in time series: review and comparison. Entropy 2021, 23(11), 1474. https://www.mdpi.com/1099-4300/23/11/1474

Zanin, M., & Papo, D. (2025). Algorithmic Approaches for Assessing Multiscale Irreversibility in Time Series: Review and Comparison. Entropy, 27(2), 126. https://www.mdpi.com/1099-4300/27/2/126

Setup

This package can be installed from PyPI using pip:

pip install irreversibility

This will automatically install all the necessary dependencies as specified in the pyproject.toml file.

Getting started

Check the files Example_*.py for examples on how to use each test, and also here.

Information about all methods, parameters, and other relevant issues can be found both in the previous papers, and in the wiki: Go to the wiki. You can also check our take on the question: why there are so many tests?

Note that all implementations have been developed in-house, and as such may contain errors or inefficient code; we welcome readers to send us comments, suggestions and corrections, using the "Issues" feature.

Full documentation

Additional topics:

Change log

See the Version History section of the Wiki for details.

Acknowledgements

This project has received funding from the European Research Council (ERC) under the European Union's Horizon 2020 research and innovation programme (grant agreement No 851255).

This work was partially supported by the María de Maeztu project CEX2021-001164-M funded by the MICIU/AEI/10.13039/501100011033 and FEDER, EU.

This work was partially supported by grant CNS2023-144775 funded by MICIU/AEI/10.13039/501100011033 by "European Union NextGenerationEU/PRTR".

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

irreversibility-1.3.3.tar.gz (55.8 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

irreversibility-1.3.3-py3-none-any.whl (87.7 kB view details)

Uploaded Python 3

File details

Details for the file irreversibility-1.3.3.tar.gz.

File metadata

  • Download URL: irreversibility-1.3.3.tar.gz
  • Upload date:
  • Size: 55.8 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.13.2

File hashes

Hashes for irreversibility-1.3.3.tar.gz
Algorithm Hash digest
SHA256 945de216d48ba13c5583d6dac6b28e2ddaaade75ab7983c22d9c10c494de3391
MD5 bcf0ea1ab02fb8c8b31e6c36418acabc
BLAKE2b-256 125978b88b7a43d72c4c47f28f9a29ffe59e12801acdcd124f2bf263058cf6ef

See more details on using hashes here.

File details

Details for the file irreversibility-1.3.3-py3-none-any.whl.

File metadata

File hashes

Hashes for irreversibility-1.3.3-py3-none-any.whl
Algorithm Hash digest
SHA256 e9dd238506f4837b07d86dee2383060296b71e29302712f6f38cedfe480ea02c
MD5 179a299b130e2b65ddf2cf74a82fc4ae
BLAKE2b-256 eed312680b6e4c2cd8a8ba922e0249dee88a52a4c37f637141c5508e3d51e8b5

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page