
Claude Skills by wenmin-wu
github.com/wenmin-wuBuild hierarchical features for transaction panels by aggregating twice — first groupby (entity, sub-key) to get a per-(entity, sub-key) summary, then groupby (entity) on those summaries to compute mean/min/max/std across the sub-keys, capturing the *distribution* of per-customer behavior rather than a single flat mean
Compresses high-dimensional targets with TruncatedSVD, trains on the reduced space, then reconstructs full predictions via the components matrix.
Detects synthetic/fake test samples by checking whether each row has at least one unique value across all features — real samples do, synthetic ones don't.
Wrap PyTorch TabNet in a scikit-learn BaseEstimator with built-in imputation and early stopping for use in VotingRegressor ensembles
Ensembles TabPFN (a prior-fitted Bayesian transformer for small tabular data) with XGBoost, averaging probabilities for stronger predictions on datasets under 1000 rows.
Reshapes tabular features into 2D pseudo-images via random feature permutation, enabling CNN-based feature interaction learning.
Builds user-level features by accumulating statistics across sequential event sessions before each assessment point.
Compress TF-IDF sparse text vectors into a handful of dense TruncatedSVD components so GBDTs can consume free-text fields as plain tabular columns
Convert per-group categorical event counts into TF-IDF-style features using log(1+tf/total) * log(N/df)
Parallel-load per-subject parquet time-series files with ThreadPoolExecutor and flatten describe() statistics into tabular feature vectors
Shape RL rewards with time-decaying asset weights and time-increasing resource weights so the agent transitions from expansion to accumulation as the game progresses
Compute shortest Manhattan distance on a toroidal (wrapping) grid by comparing normal vs wrap-around routes in each axis
Fit unsupervised transforms (scaler, PCA, variance filter) on combined train+test data for more stable statistics, especially on small datasets
Post-processes entity match predictions to enforce symmetry (A→B implies B→A) and transitivity (A→B, B→C implies A→C) via graph closure.
Aggregates deeply nested relational tables through two groupby levels (child → intermediate → parent) to build features from multi-hop relationships.
Build item co-visitation matrix from session pairs within a time window, weighting by interaction type (click/cart/order) via GPU self-join
Aggregate panel/sequential data with type-appropriate statistics — numeric (mean/std/min/max/last) and categorical (count/last/nunique) — then concat into flat features
Ensemble ranked recommendation lists by outer-joining exploded candidates and re-ranking by weighted vote sum
Map free-text categorical descriptions to ordinal numeric scores via keyword matching — captures ordered severity in a single dense feature
Custom ranking metric combining normalized weighted Gini coefficient with top-K% capture rate for imbalanced classification with class-weighted evaluation
Ensembles multiple ranked recommendation lists by scoring items as model_weight / position_rank, then re-ranking.
Evaluate recommendation quality with recall@K per action type, combined via business-importance weights
Use XGBoost DeviceQuantileDMatrix with a custom batch iterator to train on large datasets without exhausting GPU memory
Split a multi-year table into per-year partitions, run the same groupby aggregation on each, then concat and gc — a pure-pandas map-reduce that survives 100M+ rows on a 16GB kernel
Override model predictions with last known value for low-activity or low-density entities where learned trends are unreliable
Multiply per-timestep regression loss by a 0/1 availability mask so missing future steps contribute zero gradient
Generate prediction intervals by repeatedly sampling from model residuals, adding to point forecasts, and taking quantiles across synthetic futures
Detect P-bursts (fast-typing runs) and R-bursts (consecutive revisions) via polars run-length encoding over boolean event conditions
Custom multiclass log-loss that weights per-class contributions by class frequency and domain importance, usable as both training loss and eval metric
Process multiple sensor modalities through separate CNN branches then fuse via a transformer with CLS token for classification
Subtract paired reference frames from signal frames to cancel readout noise and common-mode bias
Convert a density metric back to integer counts using known population, round to nearest integer, then recompute density to exploit the discrete nature of the target
Multi-step detector calibration pipeline — ADC inversion, hot/dead pixel masking, nonlinearity correction, dark subtraction, flat-field normalization
Combines dilated 1D convolutions for multi-scale receptive fields with residual bidirectional GRU layers for sequence classification.
Align low-Hz sensor data to high-fps video by anchoring a named event (e.g. ball_snap) to a known frame index and converting time offsets via fps
Detects discrete events (state transitions) from continuous predictions using local maxima with minimum-interval constraints.
Walk-forward stacking ensemble that trains base models on expanding windows and a meta-learner on their out-of-fold predictions across time
Engineer SNR-derived features from irregular time series — flux ratio squared, error-weighted mean flux, and normalized amplitude/range features
Evaluate probabilistic forecasts using normalized Gaussian log-likelihood relative to naive and oracle baselines, scoring both mean accuracy and uncertainty calibration
Detect event start/end boundaries in time series by finding extrema of the first derivative (steepest gradient points)
Detect event ingress/egress boundaries by finding steepest gradient on each side of the signal minimum in a smoothed time series
Assign different uncertainty spread coefficients per aggregation level in hierarchical forecasts, reflecting that higher aggregation yields narrower intervals
Remove gravity component from raw accelerometer data using quaternion rotation to yield linear acceleration
Weight multi-channel signals by inverse per-channel variance with percentile clipping, emphasizing low-noise channels in aggregation
Negative log-likelihood loss over K isotropic-Gaussian trajectory modes with per-mode confidences and logsumexp stability
Predict day-by-day via Kaggle's iter_test API while maintaining a rolling history buffer for computing lag features online
Single neural network outputting all quantiles simultaneously via pinball loss over a quantile vector for joint probabilistic forecasting
Bucket inter-keystroke latencies into pause-duration ranges (0.5-1s, 1-1.5s, 1.5-2s, 2-3s, >3s) and count per session as hesitation features
Initialize a depthwise Conv1d with FIR filter coefficients as a trainable high-pass/low-pass filter for sensor signal preprocessing
Build a single per-row "day off" boolean from a holidays table with National/Regional/Local locale hierarchy and Work Day overrides that flip make-up working weekends back to working days