Skip to main content

license Documentation Status PyPI - Python Version PyPI Code style: black Open In Colab

Time Series Subsequence Search Library

Intuitive time series subsequence search

This repository hosts the TSSEARCH - Time Series Subsequence Search Python package. TSSEARCH assists researchers in exploratory analysis for query search and time series segmentation without requiring significant programming effort.

Functionalities

  • Search: We provide methods for time series query search and segmentation
  • Weights: The relative contribution of each point of the query to the overall distance can be expressed using a user-defined weight vector.
  • Visualization: We provide visualizations to present the results of the segmentation and query search
  • Unit tested: we provide unit tests for each feature
  • Easily extended: adding new distances is easy, and we encourage you to contribute with your custom distances or search methods

Get started

Installation

TSSEARCH is available at PyPI:

pip install tssearch

Example

The code below segments a 10 s electrocardiography record:

import tssearch

# Load the query, (optional) weight vector and sequence
data = tssearch.load_ecg_example()

# Selects the Dynamic Time Warping (DTW) as the distance for the segmentation
cfg = tssearch.get_distance_dict(["Dynamic Time Warping"])

# Performs the segmentation
out = tssearch.time_series_segmentation(cfg, data['query'], data['sequence'], data['weight'])

Documentation

The documentation is available here.

Available distances

Lockstep
Lp Distances
Pearson Correlation Distance
Short Time Series Distance (STS)
Elastic
Dynamic Time Warping (DTW)
Longest Common Subsequence (LCSS)
Time Warp Edit Distance (TWED)
Time
Time Alignment Measurement (TAM)

Acknowledgements

This work is a result of the project ConnectedHealth (n.º 46858), supported by Competitiveness and Internationalisation Operational Programme (POCI) and Lisbon Regional Operational Programme (LISBOA 2020), under the PORTUGAL 2020 Partnership Agreement, through the European Regional Development Fund (ERDF)

Metadata

Release files for tssearch 0.1.3

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tssearch 0.1.3
File Size Uploaded
tssearch-0.1.3.tar.gz 32.1 kB Details

Release files / tssearch-0.1.3.tar.gz

Download URL tssearch-0.1.3.tar.gz
Size 32.1 kB
Tags Source
SHA-256 checksum
How to use checksums
bcd6861d5d742672da92afa6bbe5f5f0b4427d6900ae932de0a089dc016ce13d
BLAKE2b-256 checksum
How to use checksums
4413aecde9b0c1bf40d38a81c4c8f0d80f6b3bf6a540f8f6f3005c85456105ca
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/3.1.1 pkginfo/1.4.2 requests/2.22.0 setuptools/60.2.0 requests-toolbelt/0.8.0 tqdm/4.30.0 CPython/3.8.10

Release history Release notifications | RSS feed

This release

0.1.3 This release

1 release file

0.1.2

1 release file

0.1.1

1 release file

0.1.0

1 release file

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page