Logo: Ratings Strength Models

Ratings Strength Models

Communautéit
WalrusQuant
ratings-strength-models

Baut a evaluéiert Stäerkemodeller fir Sport, dorënner sequenziell Elo-Ratings, getrennte Bewäertunge fir Ugrëff a Verdeedegung, Power-Ratings a strikt Virum-Matchup-Features. Benotzt dës Skill fir Klassementer, d'Berücksichtegung vun de Géigner an zouverlässeg Baselines fir Prognosen.

Add to TypingMind

Iwwersiicht

EditeurWalrusQuant
Repositorysports-analytic-skills
Skill-Nummratings-strength-models
Stären
53
Forks
4
Matgeliwwert Dateien
5
LizenzMIT
Linken
  • Instruktiounen am Markdown-Format

    Eng SKILL.md-Datei, déi de Modell bei Bedarf luet, soudatt nëmmen Token ufalen, wann eng Ufro tatsächlech dozou passt.

  • Funktionéiert mat all LLM

    KI-Skills si reng Markdown, keen ubidderspezifesche Code. Dofir funktionéiert dëse Skill mat GPT, Claude, Gemini, Grok oder engem lokale Modell.

  • 5 matgeliwwert Dateien

    Skripten, Virlagen a Referenzen, déi de Modell beim Schaffe liese kann. D'Dateie kënnen nëmme gelies ginn a ginn ni ausgeféiert.

  • Open Source

    WalrusQuant huet de Skill op GitHub verëffentlecht. Liest de Quelltext, ier Dir de Skill installéiert.

Installatioun

Installéiert de KI-Skill Ratings Strength Models an TypingMind, fir e mat all LLM ze benotzen, oder setzt en an en anere KI-Agent an, deen SKILL.md liest.

1

An TypingMind installéieren

TypingMind installéiert e Skill direkt aus sengem GitHub-Dossier — dobäi gëtt SKILL.md gelies, d'Ressourcedateie gi gebëndelt an d'Resultat gëtt lokal gespäichert.

  1. Maacht d'App op a gitt op Plugins → Skills.
  2. Wielt „Vu GitHub installéieren“.
  3. Pecht d'URL vum Skill-Dossier, déi hei drënner steet, an a bestätegt d'Installatioun.
    https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/ratings-strength-models
  4. Aktivéiert de Skill an all Chat, an deem Dir e benotze wëllt.
Plugins → Skills → Skill derbäisetzen → Iwwer eng GitHub-URL. Pecht dann d'URL vum Dossier an a klickt op Weider.
2

An engem anere KI-Agent installéieren

All KI-Agent, deen d'Format Agent Skills liest, kann dëse Skill benotzen — kopéiert den Dossier an d'Skill-Verzeechnes vun deem KI-Agent.

Claude Code — .claude/skills
git clone --depth 1 https://github.com/WalrusQuant/sports-analytic-skills.git /tmp/sports-analytic-skills
mkdir -p .claude/skills
cp -r /tmp/sports-analytic-skills/skills/ratings-strength-models .claude/skills/ratings-strength-models
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Ratings Strength Models an engem Chat vun TypingMind, an de Modell iwwerhëlt de Rescht. Den Numm an d'Beschreiwung stinn am System-Prompt. Soubal eng Ufro dozou passt, luet de Modell déi komplett Instruktioune selwer — Dir musst de Skill ni manuell opruffen, an et fale keng Token un, bis en tatsächlech benotzt gëtt.

De Modell luet Ratings Strength Models automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Ratings Strength Models net un de Modell gebonnen, fir deen de Skill geschriwwe gouf. Installéiert en eemol an TypingMind a benotzt e mat GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama oder engem lokale Modell, deen Dir selwer bedreift — alles mat Ären eegenen API-Schlësselen.

  • Gëtt nëmme gelueden, wann et néideg ass

    De System-Prompt enthält nëmmen den Numm an d'Beschreiwung. D'Instruktioune gi bei der éischter passender Ufro gelueden, soudatt en onbenotzte Skill näischt kascht.

  • De Modell am lafende Chat wiesselen

    Well de Skill aus Instruktiounen amplaz vu Code besteet, funktionéiert en och no engem Modellwiessel — den nächste Modell liest déi selwecht SKILL.md-Datei.

Skill-Instruktiounen

Dëst ass den Inhalt vu SKILL.md, deen de Modell luet. Liest e virun der Installatioun — e Skill besteet aus Instruktiounen, déi Äre Modell befollegt.

Ratings & Strength Models (Sports)

Overview

Estimate latent team (or player) strength from past results, then use those ratings only as they existed before game T.

Ratings are often the strongest simple sports baselines and strong features for logistic/ML models. The non-negotiable rule: as-of only.

Bundled standalone path:

  • standalone sequential rating construction
  • held-out evaluation against simple baselines

When to Use This Skill

Use when:

  • Team power ratings / rankings over a season
  • Matchup priors for win or margin models
  • Opponent adjustment
  • Strong baselines before feature-heavy ML
  • User says “Elo,” “power ratings,” or “team strength”
  • NFL/NBA/MLB Elo baselines

Do not use as a substitute for:

NeedGo to
Raw form windows onlytime-series-sports / feature-rules
Full ML horse racepredictive-modeling
Validation designvalidation-design
Season win distributions from ratingssimulation-sports

Installation

The standalone Elo builder and evaluator require pandas:

bash
python -m pip install pandas

Parquet input also needs pyarrow or fastparquet.


Workflow

  1. Choose the result signal (win, margin, goal diff, points ratio, EPA, runs).
  2. Choose update style (sequential Elo-like vs batch season-to-date).
  3. Fit/update using only past games.
  4. Export an as-of rating for each team before each game.
  5. Predict matchups from rating differentials (+ home).
  6. Evaluate with season walk-forward (validation-design).
  7. Compare to constant / home / form baselines (baseline-models).
  8. Report params, as-of rule, metrics, limits.
  9. Optional: feed into simulation-sports.

Model Families

FamilyBest forNotes
Elo / Glicko-stylesequential win strengtheasy as-of; margin optional
Offense/defense splitscore modelsattack vs defense ratings
Least-squares power ratingsseason-to-date marginssolve system each week
Hierarchical strengthplayers with uneven npartial pooling
Possession modelspace sportssport-specific later

Start with Elo-like or margin power ratings before exotic variants.

The bundled scripts implement only the sequential Elo row builder and its score table. Glicko, offense/defense, least-squares, hierarchical, margin, and possession models are methodology in this skill and require separate code.

Read rating_families.md when choosing Elo, power ratings, or an offense/defense model. Read parameters.md before setting update, home-advantage, carryover, or margin rules. Read evaluation.md before designing forward scoring and baseline comparisons.


Standalone Elo Builder and Evaluator

The builder reads a user-owned CSV, Parquet, JSON, JSONL, or NDJSON table with one row per completed game. Defaults require season, game_date, unique game_id, home_team, away_team, home_score, and away_score; all names are configurable.

bash
python /path/to/ratings-strength-models/scripts/elo_asof.py \
  --input games.csv --out elo_asof.csv --k 20 --home-adv 65

python /path/to/ratings-strength-models/scripts/eval_elo_baseline.py \
  --input elo_asof.csv

The builder saves both teams' pre-event ratings before updating either one. Its two-row-per-game output includes team, opponent, is_home, elo_pre, raw rating_diff, home-adjusted elo_diff, win_probability, and actual. Ties receive 0.5.

The order field must strictly order each team's events. If calendar dates can tie, use kickoff timestamps or a verified event sequence. The evaluator scores home rows once per game and reports season-level Elo log loss, Brier score, accuracy, a fixed 0.5 reference, and—after the first season—a home-win-rate reference estimated only from prior seasons. Pass a matched legal baseline with --baseline-prob-col to score it on the same rows. This is a score table for already-built as-of probabilities, not a full walk-forward parameter-tuning pipeline.


Design Choices

K factor

  • Higher K: reacts faster, noisier
  • Lower K: stabler, slower to adapt
  • NFL/NBA starting point: K ≈ 20 on 1500-scale Elo
  • Long-season competitions often justify a lower starting K

Home advantage

  • Add home_adv to home team pre-game Elo when computing expected score
  • Start fixed; estimate later from data if needed

Margin

  • Optional multiplier on K using point differential
  • Diminishing returns (log/sqrt) to avoid blowout domination

Mean reversion / season regression

  • Regress ratings toward mean between seasons for multi-year series
  • Important for long panels and roster turnover

Initialization

  • Common: all teams 1500
  • Report init explicitly

Other Families (patterns)

Least-squares power ratings (season-to-date)

Each week, solve team strengths from margins-to-date; store as-of ratings before each game. Recompute weekly — never use end-of-season solution for early weeks.

Offense/defense split

Each team has attack and defense parameters; predict score lines, not only winners. Still as-of only.

Hierarchical player strength

Partial pooling when player n is uneven (statistical-modeling mixed models / Bayesian refs).


Evaluation

Primary

  • walk-forward log-loss / Brier for win probability from rating diff
  • MAE for predicted margin if modeling spreads

Always compare to in the full methodology

  • constant baseline
  • home-only model
  • form logistic baseline when available

The bundled evaluator implements the 0.5 and prior-season home-rate references plus an optional supplied probability baseline. Constructing home-only logistic, form, or alternative-rating predictions requires baseline-models or another fold-local workflow before calling the evaluator.

Success

  • beats constant on most folds
  • preferably competitive with form logistic

Hard Constraints

  1. As-of only — never use post-game rating to predict that game.
  2. Update order must follow real chronology.
  3. Do not fit K on the final test season repeatedly without nested validation.
  4. Report initialization and scale (e.g. mean 1500).
  5. Do not treat ratings as causal player quality without more structure.
  6. Every rating claim must name sport, seasons, event ordering, and parameters.

Anti-Patterns

  • Final rating applied backward to early games
  • Huge K chasing noise
  • Ignoring home advantage
  • Mixing playoffs and regular season without a flag
  • Claiming ranking quality without forward prediction metrics
  • Using form and Elo interchangeably without a bakeoff

Reporting Template

text
Rating model: Elo
Sport:
Signal: win (margin multiplier: …)
Params: K=…, home_adv=…, init=1500
As-of rule: pre-game rating before update
Validation: season walk-forward
Metrics vs constant / home / form logistic: …
Calibration:
Limits: no roster continuity, no injuries, …
Reproduce: python /path/to/ratings-strength-models/scripts/elo_asof.py --input …

Output Contract

Done means:

  • As-of rule stated
  • Params stated
  • Walk-forward metrics vs baselines present
  • Limits stated
  • Repro command present

Worked Examples

bash
python /path/to/ratings-strength-models/scripts/elo_asof.py \
  --input games.csv --out elo_asof.csv --k 20 --home-adv 65

python /path/to/ratings-strength-models/scripts/eval_elo_baseline.py \
  --input elo_asof.csv

For season simulation, pass a documented pre-event probability artifact to simulation-sports; do not treat final ratings as if they existed before earlier games.


Bundled Resources

references/

FileContents
rating_families.mdfamily overview
parameters.mdK, home_adv, margin, regression
evaluation.mdhow to score ratings

scripts/

FileContents
elo_asof.pybuild pre-game Elo table
eval_elo_baseline.pyscore pre-event Elo probabilities against 0.5, prior-season home rate, and an optional supplied baseline

Related Skills

NeedSkill
Baselinesbaseline-models
Featuresfeature-rules
Form windowstime-series-sports
Predictive MLpredictive-modeling
Validationvalidation-design
Simulation from ratingssimulation-sports

Quick Command Card

bash
python /path/to/ratings-strength-models/scripts/elo_asof.py \
  --input games.csv --out elo_asof.csv --k 20 --home-adv 65

python /path/to/ratings-strength-models/scripts/eval_elo_baseline.py \
  --input elo_asof.csv

Matgeliwwert Dateien

De Modell liest dës Dateie bei Bedarf, wärend de Skill gelueden ass. Si ginn als liesbar Dateie bereetgestallt a ginn ni ausgeféiert.

Heefeg gestallte Froen

Wat mécht de KI-Skill Ratings Strength Models?

Baut a evaluéiert Stäerkemodeller fir Sport, dorënner sequenziell Elo-Ratings, getrennte Bewäertunge fir Ugrëff a Verdeedegung, Power-Ratings a strikt Virum-Matchup-Features. Benotzt dës Skill fir Klassementer, d'Berücksichtegung vun de Géigner an zouverlässeg Baselines fir Prognosen.

Firwat Ratings Strength Models op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Ratings Strength Models besteet aus einfachem Markdown amplaz vun ubidderspezifeschem Code. Dee selwechte Skill funktionéiert also mat GPT-5, Claude, Gemini, Grok oder engem lokale Modell – an Dir kënnt de Modell matzen am Chat wiesselen, ouni datt de Skill ophält ze funktionéieren. TypingMind benotzt Är eegen API-Schlësselen, sou datt Dir d'Ubidder direkt bezuelt, amplaz en Abonnement pro Benotzerplaz ze bezuelen. Är Skills a Chats bleiwen an Ärem eegene Späicher.

Wéi installéieren ech Ratings Strength Models an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/ratings-strength-models an. TypingMind liest d'Datei SKILL.md, bëndelt déi zougehéiereg Dateien an installéiert dat Ganzt als Skill, deen Dir pro Chat aktivéiere kënnt.

Wéi eng KI-Modeller kënnen Ratings Strength Models benotzen?

All Modell, deen Dir an TypingMind verbënnt. KI-Skills sinn einfach Markdown-Instruktiounen an net ubidderspezifesche Code. Dofir kënne GPT, Claude, Gemini, Grok a lokal Modeller dëse Skill lueden, wann eng Ufro dozou passt.

Wéi vill KI-Modeller kann ech mat Ratings Strength Models benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Ratings Strength Models domat benotzen – zum Beispill mat GPT, Claude, Gemini, Grok, DeepSeek, Mistral oder Llama – alles op TypingMind mat Ären eegenen API-Schlësselen.

Ass de KI-Skill Ratings Strength Models gratis?

Jo. WalrusQuant huet de Skill ënner der Lizenz MIT op GitHub publizéiert. Dir bezuelt nëmmen Ären eegene KI-Ubidder fir d'Token, déi Dir benotzt.

Wat si KI-Skills?

E KI-Skill ass e weiderverwendbare Pak vun Instruktiounen, deen engem KI-Modell bäibréngt, wéi en eng bestëmmt Aufgab erfëllt. E follegt dem oppenen Agent Skills-Format: eng Datei SKILL.md mat engem Numm an enger Beschreiwung, plus all Scripten, Virlagen oder Referenzdateien, déi de Modell eventuell brauch. De Modell liest d'Instruktiounen eréischt, wann Är Ufro zum Skill passt. En installéierte Skill kascht also näischt, bis e benotzt gëtt.

Wéi ënnerscheede sech KI-Skills vu Plugins oder MCP-Serveren?

E Plugin oder MCP-Server gëtt engem Modell nei Tools, déi en opruffe kann – Code, deen iergendwou leeft an e Resultat zeréckgëtt. E KI-Skill gëtt dem Modell dogéint Wëssen an eng Virgoensweis: wéi en eng Aufgab ugeet, wéi eng Schrëtt e maache soll a wéi eng gutt Ausgab ausgesäit. Skills bestinn aus einfachem Markdown, brauche kee Server, keen API-Schlëssel a kee Lafzäitëmfeld a funktionéiere mat all Modell.

Alleguer weisen

Elo Ären eegene KI-Aarbechtsberäich ariichten

Abonnéiert Iech op eisen Newsletter, fir iwwer nei Funktiounen an zukünfteg Gewënnspiller informéiert ze ginn 👇