Implementation of ERAL algorithm (Stržinar et al., 2024)
Project description
ERAL Algorithm
Introduction
The ERAL (Error In Alignment) algorithm is a state-of-the-art method designed for 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 eral
Usage
The main entry point for the end user is obtain_prototype method in eral.eral:
from eral.eral import obtain_prototype
class_prototype = obtain_prototype(...)
The function takes several arguments, most important are:
class_segments: a list of time series to be aligned and averagedprototyping_function: determines how the average is computed, typically the functionget_new_prototype_variable_clippingfromeral.alignment_prototyping_functionscan be used.exclustion_zone: percentage of forbidden alignments (see [1])
The basic function call is:
import numpy as np
from eral.eral import obtain_prototype
from eral.alignment_prototyping_functions import get_new_prototype_variable_clipping
X: list[np.ndarray] = [...] # Class data
class_prototype = obtain_prototype(X,
prototyping_function=get_new_prototype_variable_clipping,
exclusion_zone=0.2)
For full examples, please refer to the examples/ directory at our repository.
Examples
The examples/ directory at our repository contains Jupyter notebooks that illustrate different uses and capabilities of the ERAL algorithm.
To run an example, navigate to the examples/ directory and execute the desired notebook.
- Notebook titled
01 ERAL demodemonstrates the ERAL prototyping method using the Trace dataset from UCR Archive. - Notebook titled
02 ERAL demo on industrial datadownloads an industrial dataset from Mendeley Data, and calculates the prototypes for all classes. - Notebook titled
03 Comparisoncompares ERAL to DBA, SSG and others, using implementations intslearn
References
[1] Paper introducing ERAL
[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 eral-0.0.4.tar.gz.
File metadata
- Download URL: eral-0.0.4.tar.gz
- Upload date:
- Size: 11.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
e8cc871f8716540af2852bb2b948f9c0443eadb517dcfc6e258e6283c947302a
|
|
| MD5 |
8c1144744906bb190f8e547f84b94508
|
|
| BLAKE2b-256 |
b2f39a0f19ae67931576dbf19c7edc45c9a65ace349c67daa070580a45df1a8a
|
File details
Details for the file eral-0.0.4-py3-none-any.whl.
File metadata
- Download URL: eral-0.0.4-py3-none-any.whl
- Upload date:
- Size: 11.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/5.0.0 CPython/3.11.3
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
f713ed9fdcfddd37696489d873158644cb9a191266587f8716d663fe7def8325
|
|
| MD5 |
54465b8e812072309e13d15103ec4fd7
|
|
| BLAKE2b-256 |
1ed201efec722f6e4ac0f57f7c2d76f66a52d9ece553b747b601befe2d28a1a4
|