skills/nlp/minmax-normalized-ensemble-blend/SKILL.md
Min-max normalizes each model's predictions to [0,1] before averaging, ensuring equal contribution regardless of score distribution scale.
npx skillsauth add wenmin-wu/ds-skills nlp-minmax-normalized-ensemble-blendInstall 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.
Different models produce predictions on different scales — one might output 0.01-0.99, another 0.3-0.7. Simple averaging lets the wider-range model dominate. Min-max normalizing each model's predictions to [0, 1] before blending ensures each contributes proportionally to the final ensemble regardless of its raw score range.
import pandas as pd
def minmax_normalize(series):
return (series - series.min()) / (series.max() - series.min())
# Load predictions from different models
pred1 = pd.read_csv("submission_xlmr.csv")
pred2 = pd.read_csv("submission_bert.csv")
# Normalize then blend
submission = pred1.copy()
submission["toxic"] = (
minmax_normalize(pred1["toxic"]) * 0.5 +
minmax_normalize(pred2["toxic"]) * 0.5
)
submission.to_csv("submission.csv", index=False)
scipy.stats.rankdata followed by dividing by N gives a rank-based normalization that is more robust to outliersdata-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