Configs2026年7月26日·1 分钟阅读

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 就绪

Agent 可直接安装

这个资产可安装;Agent 先选择当前运行时、检查安装计划,再运行匹配命令。

Native · 98/100策略:允许
Agent 入口
任意 MCP/CLI Agent
类型
Skill
安装
Single
信任
信任等级:Established
入口
tsfresh Overview
直接安装命令
npx -y tokrepo@latest install b510839a-890f-11f1-9bc6-00163e2b0d79 --target codex

先 dry-run 确认安装计划,再运行此命令。

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

讨论

登录后参与讨论。
还没有评论,来写第一条吧。

相关资产