Skip to main content

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.

Metadata

Release files for patsemb 0.1.1

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

Source distribution (sdist)

Source distribution for patsemb 0.1.1
File Size Uploaded Provenance Actions
patsemb-0.1.1.tar.gz 13.2 MB Without provenance Details for patsemb-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for patsemb 0.1.1
File Interpreter ABI Platform Actions
patsemb-0.1.1-py3-none-any.whl Python 3 none any Details for patsemb-0.1.1-py3-none-any.whl

Total release size: 26.4 MB

Release files / patsemb-0.1.1.tar.gz

Download URL patsemb-0.1.1.tar.gz
Size 13.2 MB
Tags Source
SHA-256 checksum
How to use checksums
a0ed9710f32aad198cfe262f84e4f7617e282cc37f8e5ce99ece09e9bf41665e
BLAKE2b-256 checksum
How to use checksums
0599a9f71ff3eeef3b902174ffab621657bec9eeb55ca4208369c7a34f045776
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Release files / patsemb-0.1.1-py3-none-any.whl

Download URL patsemb-0.1.1-py3-none-any.whl
Size 13.2 MB
Tags Python 3
SHA-256 checksum
How to use checksums
f43076800c8e0af4831ff256ca838f560dd3da47f06e2bfc20754ac85c97ed39
BLAKE2b-256 checksum
How to use checksums
515ff6a9ddd57bdedcd0ce340716a30e8c92b8ba2d2dcaa86fe5c69f0429e8c9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.8.10

Security for patsemb 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

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