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 arbitrary long time series into a fixed size representation that embed topological information about the signal.

Alt text

Quickstart

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

from ts2pi import persistence_image
im = persistence_image([1,4.3,3,2,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,2,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.0.tar.gz (2.5 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.0-py3-none-any.whl (3.5 kB view details)

Uploaded Python 3

File details

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

File metadata

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

File hashes

Hashes for ts2pi-0.1.0.tar.gz
Algorithm Hash digest
SHA256 0141697a3b4e3fef4072c950f261e1e96bc0a1fec13ce05a510c70bac31ef086
MD5 dfced8f2fed56fcd38799bdcda2af2d1
BLAKE2b-256 5759c1ae153c84a822b3d087865e045a89b2c4c8eab3f2b180df481fa3d77f7c

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for ts2pi-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 4dcc89a44943ff67946e6c6ecc077b8bbbd26f63f96467e0c0001178bab22ade
MD5 06e497c0a3cff487a10556b914ca16c2
BLAKE2b-256 1a28a4781b0aeefb0064c9b74f8142bd3c1386bac6ba9f4ba3fcecf18857dbbc

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