https://github.com/arnedb/tsfuse

Python package for automatically constructing features from multiple time series

https://github.com/arnedb/tsfuse

Science Score: 13.0%

This score indicates how likely this project is to be science-related based on various indicators:

  • CITATION.cff file
  • codemeta.json file
  • .zenodo.json file
  • DOI references
    Found 5 DOI reference(s) in README
  • Academic publication links
  • Academic email domains
  • Institutional organization owner
  • JOSS paper metadata
  • Scientific vocabulary similarity
    Low similarity (11.9%) to scientific vocabulary

Keywords

automl feature-construction machine-learning python time-series
Last synced: 6 months ago · JSON representation

Repository

Python package for automatically constructing features from multiple time series

Basic Info
Statistics
  • Stars: 39
  • Watchers: 2
  • Forks: 3
  • Open Issues: 1
  • Releases: 0
Topics
automl feature-construction machine-learning python time-series
Created over 6 years ago · Last pushed over 1 year ago
Metadata Files
Readme License

README.md

TSFuse

Python package for automatically constructing features from multiple time series

PyPI tests


Installation

Install the latest release using pip:

pip install tsfuse

Quickstart

The example below shows the basic usage of TSFuse.

Data format

The input of TSFuse is a dataset where each instance is a window that consists of multiple time series and a label.

Time series

Time series are represented using a dictionary where each entry represents a univariate or multivariate time series. As an example, let's create a dictionary with two univariate time series:

python from pandas import DataFrame from tsfuse.data import Collection X = { "x1": Collection(DataFrame({ "id": [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], "time": [0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2], "data": [1, 2, 3, 1, 2, 3, 3, 2, 1, 3, 2, 1], })), "x2": Collection(DataFrame({ "id": [0, 0, 0, 1, 1, 1, 2, 2, 2, 3, 3, 3], "time": [0, 1, 2, 0, 1, 2, 0, 1, 2, 0, 1, 2], "data": [1, 2, 3, 1, 2, 3, 1, 2, 3, 1, 2, 3], })), }

The two univariate time series are named x1 and x2 and each series is represented as a Collection object. Each Collection is initialized with a DataFrame that has three columns:

  • id which is the identifier of each instance, i.e., each window,
  • time which contains the time stamps,
  • data contains the time series data itself.

For multivariate time series data, there can be multiple columns similar to the data column. For example, the data of a tri-axial accelerometer would have three columns x, y, z instead of data as it simultaneously measures the x, y, z acceleration.

Labels

There should be one target value for each window, so we create a Series where the index contains all unique id values of the time series data and the data consists of the labels:

python from pandas import Series y = Series(index=[0, 1, 2, 3], data=[0, 0, 1, 1])

Feature construction

To construct features, TSFuse provides a construct function which takes time series data X and target data y as input, and returns a DataFrame where each column corresponds to a feature. In addition, this function can return a computation graph which contains all transformation steps required to compute the features for new data:

python from tsfuse import construct features, graph = construct(X, y, return_graph=True)

To apply this computation graph to new data, simply call transform with a time series dictionary X as input:

python features = graph.transform(X)

Documentation

The documentation is available on https://arnedb.github.io/tsfuse/

Citing TSFuse

If you use TSFuse for a scientific publication, please consider citing this paper:

De Brabandere, A., Op De Beéck, T., Hendrickx, K., Meert, W., & Davis, J. TSFuse: automated feature construction for multiple time series data. Machine Learning (2022)

bibtex @article{tsfuse, author = {De Brabandere, Arne and Op De Be{\'e}ck, Tim and Hendrickx, Kilian and Meert, Wannes and Davis, Jesse}, title = {TSFuse: automated feature construction for multiple time series data}, journal = {Machine Learning}, year = {2022}, doi = {10.1007/s10994-021-06096-2}, url = {https://doi.org/10.1007/s10994-021-06096-2} }

Owner

  • Name: Arne De Brabandere
  • Login: arnedb
  • Kind: user
  • Location: Leuven, Belgium
  • Company: Capetech

GitHub Events

Total
  • Watch event: 3
Last Year
  • Watch event: 3

Packages

  • Total packages: 1
  • Total downloads:
    • pypi 51 last-month
  • Total dependent packages: 1
  • Total dependent repositories: 1
  • Total versions: 7
  • Total maintainers: 2
pypi.org: tsfuse

Automated feature construction for multiple time series data

  • Versions: 7
  • Dependent Packages: 1
  • Dependent Repositories: 1
  • Downloads: 51 Last month
Rankings
Dependent packages count: 10.1%
Dependent repos count: 21.6%
Average: 27.6%
Downloads: 51.2%
Maintainers (2)
Last synced: 6 months ago

Dependencies

.github/workflows/tests.yml actions
  • actions/checkout v1 composite
  • actions/setup-python v1 composite
docsource/requirements.txt pypi
  • nbsphinx *
  • sphinx *
  • sphinx-rtd-theme *
pyproject.toml pypi
setup.py pypi
  • Pint >=0.9
  • cython *
  • graphviz *
  • matplotlib *
  • numpy *
  • pandas *
  • scikit-learn >=0.20.1
  • scipy >=1.2.1
  • six >=1.12.0
  • sklearn-gbmi >=1.0.3
  • statsmodels >=0.12.0