skills/cv/separable-temporal-spectral-cnn/SKILL.md
2D CNN with asymmetric kernels — temporal convolutions (Nx1) then spectral convolutions (1xM) — to decouple time and feature extraction
npx skillsauth add wenmin-wu/ds-skills cv-separable-temporal-spectral-cnnInstall 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.
For 2D inputs with (time, feature) structure (spectrograms, sensor arrays, multi-channel time series), use asymmetric convolution kernels: first apply tall kernels (3x1) along the time axis, then wide kernels (1x3) along the feature axis. This decouples temporal pattern extraction from cross-feature learning, reducing parameters vs square kernels.
from tensorflow.keras.layers import Input, Conv2D, MaxPooling2D, BatchNormalization
def build_separable_cnn(time_steps, n_features, n_outputs):
inp = Input((time_steps, n_features, 1))
# Temporal convolutions
x = Conv2D(32, (3, 1), activation='relu', padding='same')(inp)
x = MaxPooling2D((2, 1))(x)
x = BatchNormalization()(x)
x = Conv2D(64, (3, 1), activation='relu', padding='same')(x)
x = MaxPooling2D((2, 1))(x)
# Spectral convolutions
x = Conv2D(128, (1, 3), activation='relu', padding='same')(x)
x = MaxPooling2D((1, 2))(x)
x = Conv2D(64, (1, 3), activation='relu', padding='same')(x)
# Head
x = GlobalAveragePooling2D()(x)
out = Dense(n_outputs)(x)
return Model(inp, out)
data-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