Skip to main content

PaTSEmb: Pattern-based Time Series Embedding

Project description

PaTSEmb

pipeline status coverage report

Welcome to PaTSEmb, a fast and extendable Python package for creating a pattern-based embedding of the time series. This is an embedding of the time series which contains information about the typical shapes are occurring at which locations in the time series. Below, we give a small example of how to do this, but be sure to check out the documentation!

Installation

You can install PaTSEmb using the following command:

pip install patsemb

If you want to mine frequent, sequential patterns, Java 1.7 or higher should also be available on your machine. More information about installing PaTSEmb can be found in the documentation.

Example

The code snippet below shows how to create the pattern-based embedding of a time series. Be sure to check out the example notebook for more examples!

from patsemb.discretization import SAXDiscretizer
from patsemb.pattern_mining import QCSP
from patsemb.pattern_based_embedding import PatternBasedEmbedder

# Specify a discretizer and pattern miner, or use the default values
pattern_based_embedder = PatternBasedEmbedder(
    discretizer=SAXDiscretizer(alphabet_size=8, word_size=5),
    pattern_miner=QCSP(minimum_support=3, top_k_patterns=20)
)

# Create the pattern-based embedding
time_series = ...  # Load here your time series as a numpy array
embedding = pattern_based_embedder.fit_transform(time_series)

Contact

Feel free to email to louis.carpentier@kuleuven.be if there are any questions, remarks, ideas, ...

Acknowledgments

If you use PaTSEmb in your research or project, please add the following citation:

@inproceedings{carpentier2024pattern,
    title={Pattern-based Time Series Semantic Segmentation with Gradual State Transitions},
    author={Carpentier, Louis and Feremans, Len and Meert, Wannes and Verbeke, Mathias},
    booktitle={Proceedings of the 2024 SIAM International Conference on Data Mining (SDM)},
    pages={316--324},
    year={2024},
    month={April},
    organization={SIAM},
    doi={10.1137/1.9781611978032.36}
}

L. Carpentier, L. Feremans, W. Meert, and M. Verbeke. "Pattern-based time series semantic segmentation with gradual state transitions". In Proceedings of the 2024 SIAM International Conference on Data Mining (SDM), pages 316–324. SIAM, april 2024. doi: 10.1137/1.9781611978032.36.

License

Copyright (c) 2024 KU Leuven, DTAI Research Group

Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to deal
in the Software without restriction, including without limitation the rights
to use, copy, modify, merge, publish, distribute, sublicense, and/or sell
copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:

The above copyright notice and this permission notice shall be included in all
copies or substantial portions of the Software.

THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING FROM,
OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS IN THE
SOFTWARE.

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

patsemb-0.1.1.tar.gz (13.2 MB view details)

Uploaded Source

Built Distribution

patsemb-0.1.1-py3-none-any.whl (13.2 MB view details)

Uploaded Python 3

File details

Details for the file patsemb-0.1.1.tar.gz.

File metadata

  • Download URL: patsemb-0.1.1.tar.gz
  • Upload date:
  • Size: 13.2 MB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for patsemb-0.1.1.tar.gz
Algorithm Hash digest
SHA256 a0ed9710f32aad198cfe262f84e4f7617e282cc37f8e5ce99ece09e9bf41665e
MD5 ba7c45e4fdced90072a12d8324d47208
BLAKE2b-256 0599a9f71ff3eeef3b902174ffab621657bec9eeb55ca4208369c7a34f045776

See more details on using hashes here.

File details

Details for the file patsemb-0.1.1-py3-none-any.whl.

File metadata

  • Download URL: patsemb-0.1.1-py3-none-any.whl
  • Upload date:
  • Size: 13.2 MB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/5.1.1 CPython/3.8.10

File hashes

Hashes for patsemb-0.1.1-py3-none-any.whl
Algorithm Hash digest
SHA256 f43076800c8e0af4831ff256ca838f560dd3da47f06e2bfc20754ac85c97ed39
MD5 5da382c02d0f8cd2955cd8d94fcb7183
BLAKE2b-256 515ff6a9ddd57bdedcd0ce340716a30e8c92b8ba2d2dcaa86fe5c69f0429e8c9

See more details on using hashes here.

Supported by

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