ConfigsJul 26, 2026·3 min read

tsfresh — Automatic Time Series Feature Extraction

A Python package that automatically calculates and filters hundreds of time series features for use in classification and regression tasks with scikit-learn.

Agent ready

Ready-to-run agent install

This asset can be installed after the agent chooses its runtime, checks the plan, and runs the matching command.

Native · 98/100Policy: allow
Agent surface
Any MCP/CLI agent
Kind
Skill
Install
Single
Trust
Trust: Established
Entrypoint
tsfresh Overview
Direct install command
npx -y tokrepo@latest install b510839a-890f-11f1-9bc6-00163e2b0d79 --target codex

Run after dry-run confirms the install plan.

Introduction

tsfresh (Time Series Feature extraction based on Scalable Hypothesis tests) is a Python library that automates the process of extracting meaningful features from time series data. It computes hundreds of statistical characteristics and uses statistical hypothesis testing to select only the features relevant to your prediction target, bridging the gap between raw time series and tabular machine learning.

What tsfresh Does

  • Extracts 794+ time series features including statistical, spectral, and entropy measures
  • Applies automated feature selection using Benjamini-Hochberg hypothesis testing
  • Integrates with pandas DataFrames and scikit-learn pipelines
  • Supports parallel computation for large-scale feature extraction
  • Handles panel data with multiple time series instances

Architecture Overview

tsfresh operates in two phases. First, the extraction phase computes a comprehensive set of features by applying calculators (simple, combiner, and custom) to each time series instance. Second, the selection phase evaluates each feature's relevance to the target variable using statistical tests (Mann-Whitney U, Kolmogorov-Smirnov, etc.) and filters irrelevant ones via the Benjamini-Yekutieli procedure. The distributed computation backend uses Python's multiprocessing or Dask.

Self-Hosting & Configuration

  • Install with pip install tsfresh or conda install -c conda-forge tsfresh
  • Control feature sets via ComprehensiveFCParameters, MinimalFCParameters, or EfficientFCParameters
  • Set n_jobs parameter to control parallelism during extraction
  • Use default_fc_parameters to define custom feature calculator subsets
  • Integrate into scikit-learn pipelines with TSFreshFeatureExtractor transformer

Key Features

  • Largest open-source time series feature calculator library (794+ features)
  • Statistical relevance filtering removes noise features automatically
  • Scikit-learn-compatible transformer for pipeline integration
  • Supports distributed computation for scalable extraction
  • Well-tested feature calculators with comprehensive documentation

Comparison with Similar Tools

  • sktime — Full ML framework; tsfresh specializes in feature extraction only
  • TSFEL — Smaller feature set; tsfresh provides more comprehensive coverage and built-in selection
  • Catch22 — 22 canonical features for speed; tsfresh trades speed for thoroughness
  • Featuretools — General automated feature engineering; tsfresh is time series-specific

FAQ

Q: How long does feature extraction take? A: It depends on data size and feature set. Use EfficientFCParameters for faster extraction with fewer features, or enable parallel processing with n_jobs.

Q: Can I add custom feature calculators? A: Yes. Define a function with the @set_property decorator and include it in your feature calculation settings dictionary.

Q: Does tsfresh work with irregularly sampled data? A: tsfresh expects a sort column for ordering but does not require uniform spacing. However, some features assume regular sampling.

Q: What license is tsfresh released under? A: tsfresh uses the MIT license.

Sources

Discussion

Sign in to join the discussion.
No comments yet. Be the first to share your thoughts.

Related Assets