Autoencoder Based Iterative Modeling and Subsequence Clustering Algorithm (ABIMCA)
This repository contains the python code for the Autoencoder Based Iterative Modeling and Subsequence Clustering Algorithm (ABIMCA)1 which is a deep learning method to separate multivariate time-series data (MTSD) into subsequences. It is beneficial in a variety of fields, to cluster MTSD into smaller segments or subsequences in an unsupervised manner. The ability to filter measurement data based on specific subsequences can improve downstream development products such as anomaly detection or machine diagnosis in condition based maintenance (CbM) strategies. Our algorithm is specifically useful for MTSD generated by a mechatronic system in a transient environment. It can be used offline as well as online for streaming data. It utilizes recurrent neural network (RNN) based Autoencoders (AE) by iteratively training a Base Autoencoder (BAE), generating a segmentation score and saving the intermediate parameters of the BAE to recognize previously identified subsequences.
Usage
Package can be installed with pip
$ pip install abimca
or clone the repository, and cd into the directory. Then recommendation is to create a virtual environment after installing and using python 3.9 with pyenv
python -m venv .venv
activate the environment Linux: $ source .venv/bin/activate
Windows cmd: C:> .venv\Scripts\activate.bat
Then install with poetry
$ poetry install
Finally run the minimal example in main.py
$ python -m main
The above graphic example was generated with the run_lorenz.py script. The minimal example is as follows:
from abimca import SubsequenceIdentifier
import numpy as np
def main():
# Generating random data. This will produce no class predictions or all points have the same class. For more reasonable results replace the data input with your mechatronic measurement data.
# Number of datapoints (time-steps)
n_p = 300
# Number of dimensions or features
dim = 5
X = np.random.rand(n_p, dim)
# Number of clusters
n_c = 5
y = np.random.randint(n_c, size=n_p)
# Compute online clustering
si = SubsequenceIdentifier(disable_progress_bar=False)
si.fit(X)
print(f"Label array from online fitting: \n{si.label_array}")
# Compute offline clustering
labels = si.predict(X)
print(f"Label array from online fitting: \n{labels}")
if __name__ == "__main__":
main()
References
-
Köhne, J. et al. Autoencoder based iterative modeling and multivariate time-series subsequence clustering algorithm ↩
Metadata
Release files for abimca 0.2.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | |
|---|---|---|---|---|
| abimca-0.2.5.tar.gz | 17.6 kB | Without provenance | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| abimca-0.2.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 34.3 kB
Release files / abimca-0.2.5.tar.gz
| Download URL | abimca-0.2.5.tar.gz |
|---|---|
| Size | 17.6 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
cb8d78700fd30eeea7ff6ff942a0039b39a4763adebb959046d69bff2d9e8249
|
|
BLAKE2b-256 checksum How to use checksums |
0232ff7573bf00ef1236f0c253cbcdfe0d9d81d36c6688f631dd0f498d51264b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-46-generic
|
Release files / abimca-0.2.5-py3-none-any.whl
| Download URL | abimca-0.2.5-py3-none-any.whl |
|---|---|
| Size | 16.7 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
91c59424dd650e49c09a42a8ca5a579c15b0a8f62f02c12b01e9fe7320ec7a0a
|
|
BLAKE2b-256 checksum How to use checksums |
649bbecc9350c4526f454b1a3be8592272913cfb33d20eae57e1ba033cba969b
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/1.1.13 CPython/3.9.13 Linux/5.15.0-46-generic
|
Security for abimca 0.2.5
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.