Streaming ERAL Algorithm and application to Evolving Clustering
Introduction
The sERAL (Streaming Error In Alignment) algorithm is a state-of-the-art method designed for online time series alignment and averaging. The method obtains the average time series (the prototype) from a set of time series (a class).
Installation
To use ERAL, please install the package from pypi.org using pip:
pip install seral
Usage
The main entry point for the end user is Cluster class in seral.seral:
from seral.seral import Cluster as sERAL
searl = sERAL(sample=initial_sample, id=0)
The class constructor accepts two parameters:
sample- the initial sample to be used for the prototype calculationid- the class identifier
The basic function call is:
import numpy as np
from seral.seral import Cluster as sERAL
data: list[np.ndarray] = [...]
seral: sERAL = sERAL(sample=data[0], id=id, alpha=0.5)
for sample in data[1:]:
seral.add_sample(sample=sample)
prototype = seral.prototype
For full examples, please refer to the examples/ directory at our repository.
Demonstration
The following figure demonstrates sERAL algorithm on a set of time series from the Trace dataset from UCR Archive. The dataset contains 100 time series, each with 275 samples. The time series are aligned and averaged using sERAL, and the resulting prototype is shown in the figure.
Examples
The examples/ directory at our repository. contains Jupyter notebooks that illustrate different uses and capabilities of the sERAL algorithm.
To run an example, navigate to the examples/ directory and execute the desired notebook.
- Notebook titled
01 sERAL demodemonstrates the sERAL prototyping method using the Trace dataset from UCR Archive. - Notebook titled
02 sERAL demo on industrial datadownloads an industrial dataset from Mendeley Data [2], and calculates the prototypes for all classes. - Notebook titled
03 sERAL vs ERAL vs DBA vs SBDdemonstrates the performance of sERAL, ERAL, DBA, and SBD algorithms on the industrial dataset from [2]. - Notebook titled
04 Evolving Time Series Clusteringdemonstrates the application of sERAL in the Evolving Time Series Clustering method [1].
References
[1] Stržinar, Žiga; Škrjanc, Igor; Pratama, Mahardhika and Pregelj, Boštjan (2024), "Evolving Clustering of Time Series for Unsupervised Analysis of Industrial Data Streams", available at SSRN: https://ssrn.com/abstract=5026151
[2] Stržinar, Žiga; Pregelj, Boštjan; Petrovčič, Janko; Škrjanc, Igor; Dolanc, Gregor (2024), “Pneumatic Pressure and Electrical Current Time Series in Manufacturing”, Mendeley Data, V2, doi: 10.17632/ypzswhhzh9.2, url: https://data.mendeley.com/datasets/ypzswhhzh9/2
Metadata
Release files for seral 1.0.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| seral-1.0.2.tar.gz | 15.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| seral-1.0.2-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 31.0 kB
Release files / seral-1.0.2.tar.gz
| Download URL | seral-1.0.2.tar.gz |
|---|---|
| Size | 15.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
125ec25d1550af20633aeb9b63f1d05ff15c81f0d0a6eae1b301acdca592b3b8
|
|
BLAKE2b-256 checksum How to use checksums |
95da2dca5ae3b58370d55f7049fc778d3683f55be06fdfc1e9eee69ebfacd9f8
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.3
|
Release files / seral-1.0.2-py3-none-any.whl
| Download URL | seral-1.0.2-py3-none-any.whl |
|---|---|
| Size | 15.3 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92cfe718680dc1e25819a43393856feba398641a67392afa0aa61878583701e3
|
|
BLAKE2b-256 checksum How to use checksums |
2cef9afc6f56ee74e887720dd9a4c4bbe2cd02039b88c3e28882bf869d799fbd
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/6.1.0 CPython/3.11.3
|