skills/tabular/weighted-position-decay-ensemble/SKILL.md
Ensembles multiple ranked recommendation lists by scoring items as model_weight / position_rank, then re-ranking.
npx skillsauth add wenmin-wu/ds-skills tabular-weighted-position-decay-ensembleInstall 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.
When combining ranked lists from multiple recommendation models, score each item as model_weight / (position + 1). Items appearing in multiple lists accumulate scores. Re-rank by total score to produce the final list. This naturally favors items ranked high by strong models while still crediting items from weaker ones.
def blend_recommendations(rec_lists, weights):
"""Blend multiple ranked recommendation lists.
Args:
rec_lists: list of lists, each a ranked recommendation
weights: list of floats, per-model importance weight
Returns:
list of items sorted by blended score
"""
scores = {}
for recs, w in zip(rec_lists, weights):
for rank, item in enumerate(recs):
scores[item] = scores.get(item, 0) + w / (rank + 1)
ranked = sorted(scores, key=scores.get, reverse=True)
return ranked[:12]
weight / (rank + 1) across models1/(rank+1) is simple; 1/log2(rank+2) is gentler (NDCG-like)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