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
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.
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 |
With existing popular data-science packages tsflex integrates natively*:
- Processing: e.g., scipy.signal, statsmodels.tsa.
- Feature extraction: e.g., numpy, scipy.stats, antropy, nolds, pyentrp.
* 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.
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.