Implementation of Streaming ERAL algorithm (Stržinar et al., 2024)
Project description
Streaming ERAL Algorithm
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 streaming-eral
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, and calculates the prototypes for all classes.
References
[1] Paper introducing sERAL
[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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file seral-0.0.1.tar.gz.
File metadata
- Download URL: seral-0.0.1.tar.gz
- Upload date:
- Size: 20.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
fb1b30443666b93dfa81bffaef40542d1209876bbccf6b9ad9683849e12b5534
|
|
| MD5 |
11aefeea46c3f426800aa4fad59e18c9
|
|
| BLAKE2b-256 |
a8fc3f84c5998b3111f3d9a681b8796afe3d69b3eca2b6bacdaf761bf810e286
|
File details
Details for the file seral-0.0.1-py3-none-any.whl.
File metadata
- Download URL: seral-0.0.1-py3-none-any.whl
- Upload date:
- Size: 19.7 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.1.1 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
5563724fd15b84268221ae9e060543f0513fa150aee96ec3cd699bbe3f08c9a8
|
|
| MD5 |
10e81d39ca5ac7814e963761dda1bfaa
|
|
| BLAKE2b-256 |
45e828d786b2de237d2759175c6fa9c6b06c47f145ade1efa9e310d1c1cfe6f6
|