
Claude Skills by wenmin-wu
github.com/wenmin-wuEstimate prediction uncertainty via Monte Carlo Dropout — run inference N times with dropout active and compute mean/std
Decompose multi-output prediction into a global mean (1D model) plus per-channel residuals (2D model) with quadrature uncertainty
Apply MixUp augmentation to padded time-series batches with Beta-distributed lambda and soft label mixing
Generate shift/diff features at multiple lag sizes (1,2,3,5,10,20,50,100) over cursor/time/state series, then aggregate statistics per session
Generate lag features for multiple targets over N days by shifting evaluation dates and self-joining per entity, creating a wide feature matrix of past target values
Computes rolling mean/max/std at multiple window sizes plus total variation (abs first differences) for multi-resolution temporal context.
Compute log-ratio features between adjacent frequency bands as color indices to characterize spectral shape from multi-band time series
Estimate periodicity from irregularly sampled multi-band time series using the multiband Lomb-Scargle periodogram, then phase-fold observations
Apply tsfresh per-passband feature extraction with FFT coefficients to capture multi-band periodicity from irregular time series
Single linear head that jointly predicts K candidate trajectories and K softmax confidences, sliced and reshaped for multimodal regression
Fill gaps in a daily exogenous series (oil prices, sensor feeds) by merging against a full calendar to expose NaNs, then replacing each NaN with the midpoint of its nearest valid left and right neighbors, walking outward past consecutive NaN runs
Use scipy periodogram to identify dominant seasonal frequencies in a time series before selecting Fourier feature orders or ARIMA seasonal parameters
Train a single Poisson LightGBM count forecaster, then ensemble its predictions with multiple multiplicative scaling factors (alpha ≈ 1.02-1.03) to undo the systematic downward bias of Poisson regression on intermittent retail data
Applies rolling mean or Butterworth low-pass filter to model predictions for temporal consistency and noise reduction.
Convert point forecasts to prediction intervals by scaling with logit-transformed quantile ratios passed through a Normal CDF
Derive angular velocity from consecutive quaternion frames via relative rotation and rotvec conversion
Transform forecasting target to next/current ratio minus one so that optimizing MAE or squared error implicitly minimizes SMAPE
Forecast a multi-step horizon by predicting one day ahead, writing the prediction back into the panel as the new "actual", recomputing all lag and rolling features that depend on it, then predicting the next day — turns a one-step LightGBM regressor into a 28-day forecaster without changing the model
Walk backward through a time series and multiplicatively rescale segments when jumps exceed a fraction of the running mean to correct data collection anomalies
Walk-forward validation for ARIMA by refitting on history at each step, forecasting one step ahead, then appending the true observation — produces an honest one-step error distribution that mirrors nightly-retrained production forecasters
Encode missing sensor data with a per-modality sentinel value that survives standardization and remains detectable after scaling
Scaled Pinball Loss (SPL) metric for evaluating quantile forecasts, normalized by mean absolute successive differences of training data
1D ResNet block with Squeeze-and-Excitation channel attention for temporal sensor feature extraction
Randomly zero out entire sensor modalities during training with a learned gate to handle missing modalities at inference
EDA visualization of multi-modal sensor data with axvspan shading for labeled behavioral phases and contiguous span detection
Detect and mask outlier data points using iterative sigma-clipping on reference frames or calibration data
Build per-state SNAP / event-flag interaction features by multiplying the binary flag with the sales and revenue columns segmented by state, capturing the demand uplift on government-benefit days that affects only specific geographies and product categories
Processes long sequences in fixed-size chunks while carrying RNN hidden state across chunks for memory-efficient inference.
Re-cluster retail stores by scale-normalized weekday/dayoff mean+std profiles using Ward agglomerative clustering, replacing vendor-supplied "type/cluster" labels that correlate with store size instead of demand shape
Reduce temporal resolution by averaging consecutive frame blocks to improve SNR and compress high-cadence data
Aggregate high-dimensional spatial sensor grids into hierarchical region statistics at multiple granularities
Estimate event depth by optimizing a scalar scaling factor on the in-event segment that minimizes polynomial baseline residual across the full signal
Use LightGBM's tweedie objective with variance_power between 1.05 and 1.2 for zero-inflated count forecasting (retail SKUs, intermittent demand, click events) — handles the "many zeros plus a heavy right tail" distribution that breaks both regression (RMSE) and classification (BCE) objectives
Estimate out-of-distribution class probability as the product of (1 - p_i) across all known classes, scaled by a calibrated prior
Denoise an erratic 1D series with discrete wavelet decomposition + universal soft thresholding (sigma estimated from MAD of the detail coefficients) to extract the underlying trend/seasonality without lagging the signal — a far better trend extractor than rolling means for spiky retail or sensor data