Skip to main content

A library for analysing time series using Continuous Ordinal Patterns

Project description

Continuous Ordinal Patterns (ContOP / COP) Library

Ordinal patterns are a way of analyzing time series in which values in sub-windows are studied in terms of their relative amplitude, or, in other words, of the permutation required to sort them. Such permutations are then represented as symbols, and their frequency is used to characterize the dynamics generating the time series. This, thus, represents a conceptually simple way of synthesizing a whole time series into a discrete distribution and, not surprisingly, has been applied to a plethora of real-world problems.

Continuous Ordinal Patterns (COP in short) turn this idea around: instead of using fixed patterns, we created a continuous version of these, that can be optimized to tackle a specific problem. In other words, instead of counting permutation patterns in a time series, we find the specific pattern that is better representing the same time series.

The underlying concept was firstly described in the paper:

Zanin, M. (2023). Continuous ordinal patterns: Creating a bridge between ordinal analysis and deep learning. Chaos: An Interdisciplinary Journal of Nonlinear Science, 33(3). https://doi.org/10.1063/5.0136492

In addition, specific extensions and use cases have been discussed in multiple papers, as e.g.:

Zanin, M. (2024). Augmenting granger causality through continuous ordinal patterns. Communications in Nonlinear Science and Numerical Simulation, 128, 107606. https://doi.org/10.1016/j.cnsns.2023.107606

Zanin, M. (2024). Manipulating Time Series Irreversibility Through Continuous Ordinal Patterns. Symmetry, 16(12), 1696. https://doi.org/10.3390/sym16121696

Setup

This package can be installed from PyPI using pip:

bash
pip install contop

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

Getting started

Information about all functions and tests available can be found in the wiki: Go to the wiki. Please make sure to visit the examples' page, where you will find several examples on how to use the package.

Please note that we welcome readers to send us comments, suggestions and corrections, using the "Issues" feature.

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

contop-0.2.0.tar.gz (19.5 kB view details)

Uploaded Source

Built Distribution

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

contop-0.2.0-py3-none-any.whl (20.2 kB view details)

Uploaded Python 3

File details

Details for the file contop-0.2.0.tar.gz.

File metadata

  • Download URL: contop-0.2.0.tar.gz
  • Upload date:
  • Size: 19.5 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for contop-0.2.0.tar.gz
Algorithm Hash digest
SHA256 e327dd5545a538e0e17f190631a5d754de810cb380fca0e682db39c43cda4ee9
MD5 f37f73e0613905a9f1312c0c718861a3
BLAKE2b-256 31a9b45c70df018a514851090425a210c3cfd39d3b2f73093e3be4d069ab8c81

See more details on using hashes here.

File details

Details for the file contop-0.2.0-py3-none-any.whl.

File metadata

  • Download URL: contop-0.2.0-py3-none-any.whl
  • Upload date:
  • Size: 20.2 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.13.2

File hashes

Hashes for contop-0.2.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4b3c52454f01344aa6ecb43a479fb87f0cc8e38bd1cb1f1366ee059f49ea2c14
MD5 fc5ebffbcec5c82ea75dfd8d4fd58fe1
BLAKE2b-256 51afdbebb3fb95b19a445dda8df038137337e5cdc0f3a86c58ff6418845c2fad

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