tsflex is a toolkit for flexible time series processing & feature extraction, making few assumptions about input data.
If you are using pip, just execute the following command:
Or, if you are using conda, then execute this command:
conda install -c conda-forge tsflex
tsflex is built to be intuitive, so we encourage you to copy-paste this code and toy with some parameters!
import pandas as pd; import scipy.stats as ssig; import numpy as np from tsflex.features import FeatureDescriptor, FeatureCollection, NumpyFuncWrapper # 1. -------- Get your time-indexed data -------- # Data contains 1 column; ["TMP"] url = "https://github.com/predict-idlab/tsflex/raw/main/examples/data/empatica/tmp.parquet" data = pd.read_parquet(url).set_index("timestamp") # 2 -------- Construct your feature collection -------- fc = FeatureCollection( feature_descriptors=[ FeatureDescriptor( function=NumpyFuncWrapper(func=ssig.skew, output_names="skew"), series_name="TMP", window="5min", # Use 5 minutes stride="2.5min", # With steps of 2.5 minutes ) ] ) # -- 2.1. Add features to your feature collection fc.add(FeatureDescriptor(np.min, "TMP", '2.5min', '2.5min')) # 3 -------- Calculate features -------- fc.calculate(data=data)
For processing look here
Other examples can be found here
If you use tsflex
in a scientific publication, we would highly appreciate citing us as:
@article{vanderdonckt2021tsflex, author = {Van Der Donckt, Jonas and Van Der Donckt, Jeroen and Deprost, Emiel and Van Hoecke, Sofie}, title = {tsflex: flexible time series processing \& feature extraction}, journal = {SoftwareX}, year = {2021}, url = {https://github.com/predict-idlab/tsflex}, publisher={Elsevier} }
👤 Jonas Van Der Donckt, Jeroen Van Der Donckt, Emiel Deprost
RetroSearch is an open source project built by @garambo | Open a GitHub Issue
Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo
HTML:
3.2
| Encoding:
UTF-8
| Version:
0.7.4