tsfresh extracts relevant characteristics from time series
Project description
tsfresh
This repository contains the TSFRESH python package. The abbreviation stands for
"Time Series Feature extraction based on scalable hypothesis tests".
The package provides systematic time-series feature extraction by combining established algorithms from statistics, time-series analysis, signal processing, and nonlinear dynamics with a robust feature selection algorithm. In this context, the term time-series is interpreted in the broadest possible sense, such that any types of sampled data or even event sequences can be characterised.
Spend less time on feature engineering
Data Scientists often spend most of their time either cleaning data or building features. While we cannot change the first thing, the second can be automated. TSFRESH frees your time spent on building features by extracting them automatically. Hence, you have more time to study the newest deep learning paper, read hacker news or build better models.
Automatic extraction of 100s of features
TSFRESH automatically extracts 100s of features from time series. Those features describe basic characteristics of the time series such as the number of peaks, the average or maximal value or more complex features such as the time reversal symmetry statistic.
The set of features can then be used to construct statistical or machine learning models on the time series to be used for example in regression or classification tasks.
Forget irrelevant features
Time series often contain noise, redundancies or irrelevant information. As a result most of the extracted features will not be useful for the machine learning task at hand.
To avoid extracting irrelevant features, the TSFRESH package has a built-in filtering procedure. This filtering procedure evaluates the explaining power and importance of each characteristic for the regression or classification tasks at hand.
It is based on the well developed theory of hypothesis testing and uses a multiple test procedure. As a result the filtering process mathematically controls the percentage of irrelevant extracted features.
The TSFRESH package is described in the following open access paper:
- Christ, M., Braun, N., Neuffer, J., and Kempa-Liehr A.W. (2018). Time Series FeatuRe Extraction on basis of Scalable Hypothesis tests (tsfresh -- A Python package). Neurocomputing 307 (2018) 72-77, doi: 10.1016/j.neucom.2018.03.067.
The FRESH algorithm is described in the following whitepaper:
- Christ, M., Kempa-Liehr, A.W., and Feindt, M. (2017). Distributed and parallel time series feature extraction for industrial big data applications. ArXiv e-print 1610.07717, https://arxiv.org/abs/1610.07717.
Due to the fact that tsfresh basically provides time-series feature extraction for free, you can now concentrate on engineering new time-series, like e.g. differences of signals from synchronous measurements, which provide even better time-series features:
- Kempa-Liehr, A.W., Oram, J., Wong, A., Finch, M., Besier, T. (2020). Feature engineering workflow for activity recognition from synchronized inertial measurement units. In: Pattern Recognition. ACPR 2019. Ed. by M. Cree et al. Vol. 1180. Communications in Computer and Information Science (CCIS). Singapore: Springer 2020, 223–231. doi: 10.1007/978-981-15-3651-9_20.
Systematic time-series features engineering allows to work with time-series samples of different lengths, because every time-series is projected into a well-defined feature space. This approach allows the design of robust machine learning algorithms in applications with missing data.
- Kennedy, A., Gemma, N., Rattenbury, N., Kempa-Liehr, A.W. (2021). Modelling the projected separation of microlensing events using systematic time-series feature engineering. Astronomy and Computing 35.100460 (2021), 1–14, doi: 10.1016/j.ascom.2021.100460
Natural language processing of written texts is an example of applying systematic time-series feature engineering to event sequences, which is described in the following open access paper:
- Tang, Y., Blincoe, K., Kempa-Liehr, A.W. (2020). Enriching Feature Engineering for Short Text Samples by Language Time Series Analysis. EPJ Data Science 9.26 (2020), 1–59. doi: 10.1140/epjds/s13688-020-00244-9
Advantages of tsfresh
TSFRESH has several selling points, for example
- it is field tested
- it is unit tested
- the filtering process is statistically/mathematically correct
- it has a comprehensive documentation
- it is compatible with sklearn, pandas and numpy
- it allows anyone to easily add their favorite features
- it both runs on your local machine or even on a cluster
Next steps
If you are interested in the technical workings, go to see our comprehensive Read-The-Docs documentation at http://tsfresh.readthedocs.io.
The algorithm, especially the filtering part are also described in the paper mentioned above.
If you have some questions or feedback you can find the developers in the gitter chatroom.
We appreciate any contributions, if you are interested in helping us to make TSFRESH the biggest archive of feature extraction methods in python, just head over to our How-To-Contribute instructions.
If you want to try out tsfresh
quickly or if you want to integrate it into your workflow, we also have a docker image available:
docker pull nbraun/tsfresh
Acknowledgements
The research and development of TSFRESH was funded in part by the German Federal Ministry of Education and Research under grant number 01IS14004 (project iPRODICT).
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
File details
Details for the file peritus-test-tsfresh-1.1.0.tar.gz
.
File metadata
- Download URL: peritus-test-tsfresh-1.1.0.tar.gz
- Upload date:
- Size: 3.3 MB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 280d1882e34784576f5398f25078f0758b8362b1bb0d261421c929a11c5d5ca8 |
|
MD5 | 79cc221b0ee7a166eaad3e901bf641c1 |
|
BLAKE2b-256 | c77e88636e8c4acdad2e23f5b709ad3405e8de0400e3460b1aff6f65579a3988 |
File details
Details for the file peritus_test_tsfresh-1.1.0-py2.py3-none-any.whl
.
File metadata
- Download URL: peritus_test_tsfresh-1.1.0-py2.py3-none-any.whl
- Upload date:
- Size: 97.3 kB
- Tags: Python 2, Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/4.0.1 CPython/3.8.10
File hashes
Algorithm | Hash digest | |
---|---|---|
SHA256 | 5059c07c465860f41bf92cb070019ab9c245b41b43fe9d7f11d9df216636966f |
|
MD5 | c6b272161d4b1e305b6fd98ede58b039 |
|
BLAKE2b-256 | b0b2193a070dc60259c64e493e6955f084dff3fdedc8e469d27fa238e0695bf3 |