Catalog PyPI
Back to packageRELEASE DETAILS

0.2.5

PyPI

abimca

Autoencoder based iterative modeling and multivariate time-series subsequence clustering algorithm (ABIMCA)

algorithmautoencoderclusteringidentificationmultivariatesubsequencetime-series
Published8 Sept 2022
Direct dependencies8
Transitive dependenciesNot calculated

README

Version 0.2.5 documentation

DOI Python 3.9

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.

Autoencoder Based Iterative Modeling and Subsequence Clustering Algorithm (ABIMCA)

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

Footnotes

  1. Köhne, J. et al. Autoencoder based iterative modeling and multivariate time-series subsequence clustering algorithm ↩

Downloads & popularity

Awaiting observations

No metric observations yet

Download counts and popularity will appear here as the collector receives them.

Declared dependencies 8

Native requirements
8 direct targetsNot calculated transitive count
Package / targetRequirementRelationship
torch
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
torch (>=1.12.1,<2.0.0)runtime
pandas
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
pandas (>=1.4.3,<2.0.0)runtime
numpy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
numpy (>=1.23.2,<2.0.0)runtime
matplotlib
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
matplotlib (>=3.5.3,<4.0.0)runtime
scipy
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
scipy (>=1.9.0,<2.0.0)runtime
scikit-learn
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
scikit-learn (>=1.1.2,<2.0.0)runtime
tqdm
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
tqdm (>=4.64.0,<5.0.0)runtime
coloredlogs
Environment
{
  "extras": "",
  "marker": null,
  "requires_python": ">=3.9,<3.12",
  "evaluation": "NOT_EVALUATED"
}
coloredlogs (>=15.0.1,<16.0.0)runtime

Distribution files

2 collected
abimca-0.2.5-py3-none-any.whl

bdist_wheel · 16.28 KB · Python py3

Source file
abimca-0.2.5.tar.gz

sdist · 17.21 KB · Python source

Source file

Repository

PENDING
jokonu/abimca

Shared repository data · GitHub

License detected in repository
Not collected

Metadata history

Meaningful changes
Current collected state Current

Observed since 20 Oct, 17:25 UTC

No superseded metadata states collected. Unchanged observations do not create new revisions.

Record identity

package_version:9c6a5396ca043cd26c87d00ac1e884fc8cd3d03e092076a4f7b9d8962491d265

Other collected versions

View all collected versions →