Skip to main content

Python module to transform a time series into a persistence image representation

Project description

Time Series to Persistence Image

Little module to transform a time series into a persistence image.

Can be used to convert an arbitrarily long time series into a fixed size representation that embed topological information about the signal.

Illustration

Quickstart

Install with pip install ts2pi and use the function this way:

from ts2pi import persistence_image
im = persistence_image([1,4.3,3,5.1,1.5]) # numpy array of shape (40,40)

Overview

You might need to change the default values of the function parameters, because they highly depend on the time series you are manipulating.

from ts2pi import persistence_image
import matplotlib.pyplot as plt

l = [1,4.3,3,5.1,1.5]
im = persistence_image(l, resolution=[40,40], t=3, bandwidth=0.1) # numpy array of shape <resolution>
plt.imshow(im)

Try changing the values of t and bandwidth and see how it looks. Ideally, you could expect to see several patches on the image, like in the example above.

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

ts2pi-0.1.4.tar.gz (2.6 kB view details)

Uploaded Source

Built Distribution

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

ts2pi-0.1.4-py3-none-any.whl (3.6 kB view details)

Uploaded Python 3

File details

Details for the file ts2pi-0.1.4.tar.gz.

File metadata

  • Download URL: ts2pi-0.1.4.tar.gz
  • Upload date:
  • Size: 2.6 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for ts2pi-0.1.4.tar.gz
Algorithm Hash digest
SHA256 364fb78cff09883c78fc67daba1ed3c58db3505599fbc6bc77355d6c3c775e67
MD5 844b27d68dde066fb27575240723675e
BLAKE2b-256 1131c5d133186d3678460b60683717129690e1f7ec256b18552fdb651c801621

See more details on using hashes here.

File details

Details for the file ts2pi-0.1.4-py3-none-any.whl.

File metadata

  • Download URL: ts2pi-0.1.4-py3-none-any.whl
  • Upload date:
  • Size: 3.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.5.0.1 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.8.3

File hashes

Hashes for ts2pi-0.1.4-py3-none-any.whl
Algorithm Hash digest
SHA256 fa2f0d8e921cdb6d348dc7ed3b503468c210abeeed414278c412d1f56264db12
MD5 da663ff1dd1958fbccaf3f1c17a8bd4e
BLAKE2b-256 323f9519d41ba7e15065ab6d6e849937f3644bc3b78d1bd48cdad4db96e2d257

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