Skip to content

Latest commit

 

History

History

examples

tsflex examples

This folder contains several examples, indicating (1.) the cross-domain applicability of tsflex and (2.) how tsflex integrates seamless with other data science packages.

To install the additional packages required for the examples, run:

pip install -r requirements.txt

0. general examples

Paper example: tsflex_paper.ipynb
Example used in the tsflex paper. The example shows how tsflex can be applied for processing & feature extraction on multivariate (and even irregularly sampled) time series data.

Verbose example: verbose_example.ipynb
Example that elaborates in great detail (very verbose) the various functionalities of tsflex. In addition to processing & feature extraction, this example shows how to use the logging functionality, serialization, and chunking.

1. tsflex cross-domain examples

tsflex is a domain independent package for time series processing & feature extraction;

Domain Dataset ML Notebook
Climate modelling Ozone level detection example_ozone_level_detection.ipynb
Household data Electric power consumption example_power_consumption_estimation.ipynb
Clinical data Sleep-EDF Database Expanded example_sleep_staging.ipynb
kaggle competition Tabular Playground Series - Apr 2022 https://www.kaggle.com/code/jeroenvdd/tpsapr22-best-non-dl-model-tsflex-powershap

2. tsflex integration examples

With existing popular data-science packages tsflex integrates natively*:

* Note that some functions, should be decorated with the FuncWrapper. This is for example necessary when a function returns a tuple of values or when a function requires a keyword argument.

Feature extraction

We highlight how tsflex integrates conveniently with popular time series feature extraction packages:

package example notebook
seglearn seglearn_integration.ipynb
tsfresh tsfresh_integration.ipynb
tsfel tsfel_integration.ipynb

As some of these time series feature extraction packages use different formats for their feature function, a wrapper function might be required to enable a convenient integration.

We encourage users to add example notebooks for other feature extraction packages (and if necessary, add the required wrapper function in the tsflex.features.integrations file.
=> More info on contributing can be found here.