fraunhoferportugal / tsfel

An intuitive library to extract features from time series.
https://tsfel.readthedocs.io
BSD 3-Clause "New" or "Revised" License
932 stars 143 forks source link

Get different number of columns in extracted features #115

Closed hanlinGao closed 1 year ago

hanlinGao commented 2 years ago

I use time_series_features_extractor to extract multiple time series, which is a dataframe with columns [ts1, ts2]. Now I have several such tables, and I run time_series_features_extractor on each, and want to concatenate the result by axis=1. But I find the numbers of features extracted are different. Can you tell me in what situation a feature will be dropped from result? It seems 780 features will be extracted by default.

mbarandas commented 1 year ago

Hi @HanlinGao, We apologize for the delay in responding. The features are not intentionally excluded from the result. The variation in the number of features might be attributed to the differences in the size of your time series data. For instance, the fft_mean_coeff function typically generates 256 coefficients (equivalent to 256 features) by default. However, if your time series comprises fewer than 512 data points, the coefficient count will reduce accordingly, leading to a lower count of features. It's worth noting that certain feature functions are designed to yield multiple features, such as hist, lpcc, mfcc or ecdf.