
Claude Skills by wenmin-wu
github.com/wenmin-wuTrains multiple models per CV fold with different random seeds for augmentation, then averages their predictions to reduce variance from stochastic data generation.
Fuse recommendation candidates from user history, multiple co-visitation matrices, and global popularity in a priority-ordered cascade
Trains on a finer-grained multiclass target (subtypes), then collapses non-baseline classes into a single positive class for binary submission.
Use scipy Nelder-Mead simplex to optimize regression-to-ordinal thresholds maximizing quadratic weighted kappa on OOF predictions
Computes seconds until the next event within a group using diff().shift(-1) on sorted timestamps, capturing user behavior velocity.
Creates bi-gram and tri-gram composite categorical features by concatenating top categorical columns, then target-encodes the composites. Captures interaction effects that tree models may miss.
Scores features by comparing actual importances against a null distribution from shuffled targets, removing features that cannot beat random noise.
Generates out-of-fold predictions from auxiliary models and uses them as input features for the final model.
Score candidate movement directions by average distance to nearby opponents and pick the safest path for ball-carrying agents in game AI
Uses Optuna with TPE sampler for Bayesian hyperparameter optimization of LightGBM, searching key params like num_leaves, depth, and learning rate.
When a regression target has a long discrete tail (e.g. ~1% of rows pinned at -33.22 in Elo), train one regressor on the *non-outlier* subset, a separate binary classifier for the outlier flag, and splice the predictions — replace the top-K most-confident outlier predictions in the regressor's output with the outlier value, where K is calibrated on validation
Encode a categorical column by replacing each category with the per-category outlier rate (mean of a binary outlier flag), out-of-fold to avoid leakage — a target-aware encoding tuned to long-tail / sentinel-target problems where a binary classifier signal is more useful than the raw regression mean
Generates all C(n,2) pairwise feature combinations, target-encodes each pair with cuML TargetEncoder, then applies logit polynomial expansion (z, z^2, z^3) for stacking with cuML LogisticRegression.
Uses negative row-wise Pearson correlation as a differentiable loss function for multi-output regression, directly optimizing the competition metric.
Post-processing correction for multi-output regression — scale each output by its train-derived mean ratio to fix systematic per-feature bias
Binarizes each CV fold's predictions using its own optimized threshold, then majority-votes across folds instead of averaging raw probabilities.
Apply VarianceThreshold within each data partition on combined train+test to select informative features per subgroup
Trains independent models per target by masking NaN labels, enabling multi-output regression on datasets where each target has different coverage.
Trains separate models for each discrete category (e.g., molecule type, product class) to capture type-specific patterns.
Parse structured text fields like '1 RB, 2 TE, 2 WR' into separate numeric columns per category
Divide a game into repeating phases (attack, mine, spawn) with turn-modular gating so the agent cycles between aggressive and economic behavior
Mirror spatial coordinates and angles so all plays face the same direction — removes left/right asymmetry from sports and spatial data
Generates polynomial powers and interaction terms from selected numeric features to capture nonlinear relationships with the target.
Fills unfilled recommendation slots with globally popular recent items to handle cold-start users and short lists.
Wrap a Kaggle competitive game environment as an OpenAI Gym env with continuous action space for training PPO agents via stable-baselines3
Post-hoc rescales ensemble probabilities by the inverse of each class's estimated total mass across the test set, correcting for class imbalance in predictions.
Rebalances training data by oversampling the majority class to match a known test-set class prior, reducing prediction miscalibration.
Augments training data with high-confidence test predictions as pseudo labels, retrains the model, and keeps the result only if OOF AUC improves. A semi-supervised technique for tabular competitions.
Ensembles multiple model predictions by converting to ranks, averaging, and normalizing back to [0,1].
Blends predictions from multiple models by converting to ranks, weighting, and calibrating back to probabilities via rank-group means from a reference model. Ensures monotonic calibrated output.
Computes all numeric RDKit molecular descriptors from SMILES strings, filtering out NaN, constant, and infinite values to produce a clean feature matrix.
Generates recommendation candidates by ranking a customer's purchase history by frequency and recency within a recent window.
Encode closed rectangular patrol routes as compact direction-distance strings for fleet pathfinding on toroidal game grids
Uses RFE with a tree estimator to iteratively remove least important features, selecting an optimal compact feature set.
Convert a scalar regression prediction into a smoothed CDF over discrete bins using a linear ramp instead of a hard step
Converts regression predictions to ordinal classes by optimizing bin thresholds to maximize Quadratic Weighted Kappa.
Use QuadraticDiscriminantAnalysis with regularization for binary classification on data with Gaussian cluster structure
Computes differences and ratios between group-level aggregates and raw values to capture how each sample deviates from its group.
Two-stage stacking where Ridge regression on OHE+scaled features produces OOF predictions fed as an extra feature to XGBoost, letting the tree model correct non-linear residuals on top of captured linear patterns.
Custom Keras RMSLE metric using K.log with K.clip to safely evaluate price and count regression during training
Engineers row-wise statistical features (sum, mean, std, skew, kurtosis, median, min, max) across all numeric columns per sample.
Normalizes each sample's multi-output target vector to zero mean and unit variance, removing per-sample scale differences before training.
Map calendar dates to categorical season phases (offseason, preseason, regular, postseason) using np.select with boundary date conditions
Simulated annealing with diverse move operators (translate, rotate, swap, Levy flight, squeeze) and adaptive reheating on stagnation for combinatorial optimization
Augments molecular datasets by generating multiple randomized SMILES strings for the same molecule, exploiting SMILES non-uniqueness to multiply training samples.
Train LightGBM directly on a scipy.sparse.hstack of TF-IDF text vectors and dense tabular columns, passing feature_name and categorical_feature so native categorical handling survives the sparse block
Compute min/max/mean/std of Euclidean distances from all entities to a key point, then aggregate per group for spatial feature engineering
Three-stage packing refinement — uniform squeeze toward centroid, greedy compaction per object, then multi-directional local search — to tighten solutions after metaheuristic optimization
Online inference pattern that processes test batches sequentially, updating feature dictionaries incrementally for time-series prediction APIs.
Use Shapely STRtree spatial index for O(n log n) polygon overlap detection instead of brute-force O(n^2) pairwise checks