skills/timeseries/multiband-tsfresh-fft/SKILL.md
Apply tsfresh per-passband feature extraction with FFT coefficients to capture multi-band periodicity from irregular time series
npx skillsauth add wenmin-wu/ds-skills timeseries-multiband-tsfresh-fftInstall this skill globally with one command. Works with Claude Code, Cursor, and Windsurf.
3 of 9 scanners reported clean
Some scanners were skipped, did not run, or reported a non-clean status. Review each row below.
Use tsfresh's extract_features with the column_kind parameter to automatically compute features per frequency band in parallel. Include FFT coefficient magnitudes alongside standard statistics (kurtosis, skewness) to capture periodic structure. The per-band FFT features are especially useful for irregularly sampled multi-band data where time-domain periodicity detection is noisy.
from tsfresh import extract_features
def multiband_tsfresh(df, id_col='object_id', time_col='mjd',
band_col='passband', value_col='flux'):
"""Extract per-band features including FFT coefficients.
Args:
df: DataFrame with multi-band time series
id_col: entity identifier
time_col: timestamp column
band_col: passband/channel column
value_col: measurement value column
"""
fcp = {
'fft_coefficient': [
{'coeff': 0, 'attr': 'abs'},
{'coeff': 1, 'attr': 'abs'},
],
'kurtosis': None,
'skewness': None,
}
features = extract_features(
df,
column_id=id_col,
column_sort=time_col,
column_kind=band_col,
column_value=value_col,
default_fc_parameters=fcp,
n_jobs=4,
)
return features
'maximum', 'minimum', 'standard_deviation' for richer featuresdata-ai
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
data-ai
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
testing
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
tools
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF