Skip to main content

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 averaged
  • prototyping_function: determines how the average is computed, typically the function get_new_prototype_variable_clipping from eral.alignment_prototyping_functions can 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.

Demonstration

The following figure demonstrates ERAL 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 ERAL, and the resulting prototype is shown in the figure. ERAL demonstration

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 demo demonstrates the ERAL prototyping method using the Trace dataset from UCR Archive.
  • Notebook titled 02 ERAL demo on industrial data downloads an industrial dataset from Mendeley Data, and calculates the prototypes for all classes.
  • Notebook titled 03 Comparison compares ERAL to DBA, SSG and others, using implementations in tslearn

References

[1] STRŽINAR, Žiga; PREGELJ, Boštjan; ŠKRJANC, Igor. Non-elastic time series fuzzy clustering for efficient analysis of industrial data sets. Applied Soft Computing, 2024, 112398, doi: 10.1016/j.asoc.2024.112398.
[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 eral 1.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for eral 1.1.1
File Size Uploaded
eral-1.1.1.tar.gz 15.5 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for eral 1.1.1
File Interpreter ABI Platform
eral-1.1.1-py3-none-any.whl Python 3 none any Details

Total release size: 31.3 kB

Release files / eral-1.1.1.tar.gz

Download URL eral-1.1.1.tar.gz
Size 15.5 kB
Tags Source
SHA-256 checksum
How to use checksums
3f9ef04cafa504687450151e1ca41da4a98b9d7b0726dc266af8c8833acaf473
BLAKE2b-256 checksum
How to use checksums
3e30aae07f965b157ac8774c2d1bf29bc0f0bb326e8b01ab981ff7f1e6000e03
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.3

Release files / eral-1.1.1-py3-none-any.whl

Download URL eral-1.1.1-py3-none-any.whl
Size 15.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
b0923e0ebc34196f3433c9050bc99ab3e0ca3af54ad63d7581f976748f69d109
BLAKE2b-256 checksum
How to use checksums
66bccda8a98cfc865991339945fe3fb543f11f36403ce7a95a784bb90e036a43
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.0.0 CPython/3.11.3

Release history Release notifications | RSS feed

This release

1.1.1 This release

2 release files

1.1.0

2 release files

1.0.2

2 release files

1.0.1

2 release files

1.0.0

2 release files

0.0.7

2 release files

0.0.6

2 release files

0.0.5

2 release files

0.0.4

2 release files

0.0.3

2 release files

0.0.2

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page