Home

Awesome

Documentation Status license PyPI - Python Version PyPI Downloads Open In Colab

Time Series Feature Extraction Library

<p align="center"> <a href="https://readthedocs.org/projects/tsfel/badge/?version=latest"><img src="https://raw.githubusercontent.com/fraunhoferportugal/tsfel/feature/datasets/docs/imgs/tsfel_feature_sets.png" width="100%" alt="tsfel logo" /></a> </p>

Intuitive time series feature extraction

This repository hosts the TSFEL - Time Series Feature Extraction Library python package. TSFEL assists researchers on exploratory feature extraction tasks on time series without requiring significant programming effort.

Users can interact with TSFEL using two methods:

Online

It does not requires installation as it relies on Google Colabs and a user interface provided by Google Sheets

Offline

Advanced users can take full potential of TSFEL by installing as a python package

pip install tsfel

Includes a comprehensive number of features

TSFEL is optimized for time series and automatically extracts over 65 different features on the statistical, temporal, spectral and fractal domains.

Functionalities

Get started

The code below extracts all the available features on an example dataset file.

import tsfel
import pandas as pd

# load dataset
df = pd.read_csv("Dataset.txt")

# Retrieves a pre-defined feature configuration file to extract all available features
cfg = tsfel.get_features_by_domain()

# Extract features
X = tsfel.time_series_features_extractor(cfg, df)

Available features

Statistical domain

FeaturesComputational Cost
Absolute energy1
Average power1
ECDF1
ECDF Percentile1
ECDF Percentile Count1
Entropy1
Histogram1
Interquartile range1
Kurtosis1
Max1
Mean1
Mean absolute deviation1
Median1
Median absolute deviation1
Min1
Root mean square1
Skewness1
Standard deviation1
Variance1

Temporal domain

FeaturesComputational Cost
Area under the curve1
Autocorrelation2
Centroid1
Lempel-Ziv-Complexity*2
Mean absolute diff1
Mean diff1
Median absolute diff1
Median diff1
Negative turning points1
Peak to peak distance1
Positive turning points1
Signal distance1
Slope1
Sum absolute diff1
Zero crossing rate1
Neighbourhood peaks1

* Disabled by default due to its longer execution time compared to other features.

Spectral domain

FeaturesComputational Cost
FFT mean coefficient1
Fundamental frequency1
Human range energy1
LPCC1
MFCC1
Max power spectrum1
Maximum frequency1
Median frequency1
Power bandwidth1
Spectral centroid2
Spectral decrease1
Spectral distance1
Spectral entropy1
Spectral kurtosis2
Spectral positive turning points1
Spectral roll-off1
Spectral roll-on1
Spectral skewness2
Spectral slope1
Spectral spread2
Spectral variation1
Wavelet absolute mean2
Wavelet energy2
Wavelet standard deviation2
Wavelet entropy2
Wavelet variance2

Fractal domain

FeaturesComputational Cost
Detrended fluctuation analysis (DFA)3
Higuchi fractal dimension3
Hurst exponent3
Maximum fractal length3
Multiscale entropy (MSE)1
Petrosian fractal dimension1

Fractal domain features are typically applied to relatively longer signals to capture meaningful patterns, and it's usually unnecessary to previously divide the signal into shorter windows. Therefore, this domain is disabled in the default feature configuration files.

Citing

When using TSFEL please cite the following publication:

Barandas, MarĂ­lia and Folgado, Duarte, et al. "TSFEL: Time Series Feature Extraction Library." SoftwareX 11 ( 2020). https://doi.org/10.1016/j.softx.2020.100456

Acknowledgements

We would like to acknowledge the financial support obtained from the project Total Integrated and Predictive Manufacturing System Platform for Industry 4.0, co-funded by Portugal 2020, framed under the COMPETE 2020 (Operational Programme Competitiveness and Internationalization) and European Regional Development Fund (ERDF) from European Union ( EU), with operation code POCI-01-0247-FEDER-038436.