Skip to main content

tsxtractor

Fast time-series feature extraction for Python, with a Rust core.

Extracts 33 statistical, temporal, and spectral features from batches of time series. The Rust core releases the GIL and parallelizes across series with rayon, so extraction scales with your cores and takes zero-copy views of your numpy arrays.

Install

pip install maturin
maturin develop --release   # from a clone, inside a virtualenv

Usage

import numpy as np
import tsxtractor

# batch: one row per series
X = np.random.randn(10_000, 500)
feats = tsxtractor.extract_features(X)        # (10_000, 33) float64
names = tsxtractor.feature_names()            # column order

# ragged series of different lengths
feats = tsxtractor.extract_features([arr1, arr2, arr3])

# rolling windows over one long series
feats = tsxtractor.sliding_features(x, window=256, stride=64)

Features (33)

Group Features
Stats mean, std, var, min, max, median, quantile_10/25/75/90, skewness, kurtosis, abs_energy, root_mean_square
Change mean_abs_change, mean_change, cid_ce (z-normalized), mean_second_derivative_central
Counts zero_crossings, mean_crossings, number_of_peaks (support 3), longest_strike_above/below_mean
Correlation autocorr at lags 1, 2, 5, 10; linear trend slope and r²
Entropy permutation_entropy (order 3, normalized to [0, 1])
Spectral dominant_frequency, spectral_centroid, spectral_entropy (positive bins, DC excluded, sample spacing 1)

Conventions: population moments (ddof=0); numpy-default linear interpolation for quantiles; skewness/kurtosis follow scipy.stats with bias=True (kurtosis is Fisher/excess).

NaN policy: any NaN in a series makes all its features NaN — no silent imputation. Features that are undefined for a series (e.g. autocorrelation of a constant series, spectral features of a constant series, change features of a length-1 series) are NaN individually.

Benchmark

python benches/bench_vs_tsfresh.py 1000 500

Measured on Windows 11, Python 3.14, 1000 series × 500 steps:

features time
tsxtractor 33 0.004 s
tsfresh (EfficientFCParameters) 777 155 s

tsfresh computes far more features, so the honest number is per-feature throughput: ~1700× faster per feature. 100 000 series × 500 steps runs in 0.32 s.

Development

python -m venv .venv && . .venv/Scripts/activate
pip install maturin numpy scipy pytest
maturin develop --release
pytest tests/            # every feature validated against numpy/scipy references

Metadata

Release files for tsxtractor 0.1.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for tsxtractor 0.1.1
File Size Uploaded Provenance Actions
tsxtractor-0.1.1.tar.gz 264.6 kB Without provenance Details for tsxtractor-0.1.1.tar.gz

Built distribution (wheel)

Table of built distributions (wheels) for tsxtractor 0.1.1
File Interpreter ABI Platform Actions
tsxtractor-0.1.1-cp310-abi3-win_amd64.whl CPython 3.10 abi3 Windows x86-64 Details for tsxtractor-0.1.1-cp310-abi3-win_amd64.whl

Total release size: 779.5 kB

Release files / tsxtractor-0.1.1.tar.gz

Download URL tsxtractor-0.1.1.tar.gz
Size 264.6 kB
Tags Source
SHA-256 checksum
How to use checksums
5adbb2d9765751dbd11eb4ea9289a8ae05b90f1784ea1ca05ae324d72820a601
BLAKE2b-256 checksum
How to use checksums
c40183629c1abf9670877040aa2a8fabcbabc228293c5b3e83ca2ec5e43a134d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Release files / tsxtractor-0.1.1-cp310-abi3-win_amd64.whl

Download URL tsxtractor-0.1.1-cp310-abi3-win_amd64.whl
Size 514.8 kB
Tags CPython 3.10 Windows x86-64 abi3
SHA-256 checksum
How to use checksums
321f8eeb565afc977afaa2b46e046564db0b6316edd60648fdcc464dde2a8ec7
BLAKE2b-256 checksum
How to use checksums
66934dbb21110bf676a0eb45099785ca90ef957dcfcb367a7f736a38f51cdace
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via maturin/1.14.1

Security for tsxtractor 0.1.1

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

Release history Release notifications | RSS feed

This release

0.1.1 This release

2 release files No provenance

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page