Logo: Model Interpretation

Model Interpretation

Communautéit
WalrusQuant
model-interpretation

Interpretéiert Sportmodeller mat Hëllef vun zeréckbehalene Prognosen, Koeffizienten, Feeleranalysen, de gréisste Feeler, dem Kontext vun der Kalibratioun a Stabilitéitskontrollen. Benotzt dës Skill no enger zäitbewosster Evaluatioun, wann Dir erkläre wëllt, wat e Modell beaflosst a wou e scheitert.

Add to TypingMind

Iwwersiicht

EditeurWalrusQuant
Repositorysports-analytic-skills
Skill-Nummmodel-interpretation
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 Model Interpretation 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/model-interpretation
  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/model-interpretation .claude/skills/model-interpretation
Start Claude Code nom Kopéieren nei, fir datt den neie Skill erkannt gëtt.

An TypingMind benotzen

Aktivéiert Model Interpretation 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 Model Interpretation automatesch, soubal eng Ufro dozou passt.

Funktionéiert mat all KI-Modell

KI-Skills si reng Markdown-Instruktiounen amplaz vun ubidderspezifeschem Code. Dofir ass Model Interpretation 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.

Model Interpretation (Sports)

Overview

Explain model behavior after evaluation — never instead of evaluation.

Interpretation answers:

  • what the model relies on
  • where it fails
  • whether failures concentrate (season, home/away, probability tails)
  • whether the story is stable enough to put in a model card

It does not turn a losing walk-forward into a win.

Work from held-out prediction tables, fold summaries, and model-specific coefficient or importance artifacts.


When to Use This Skill

Use when:

  • After win / margin / Elo pipelines finish
  • Debugging bad folds
  • Writing results or model cards
  • User asks “why,” “largest misses,” “where does it break,” “what drives this”
  • Comparing two models on the same walk-forward folds

Do not use when:

NeedGo instead
No held-out predictions yetpredictive-modeling first
Leakage still openleakage-audit
Pure presentation cleanupanti-slop-analytics
Only global metrics writeupresults-reporting
Probability reliability deep-divecalibration-check

Installation

The bundled helpers require pandas and NumPy:

bash
python -m pip install pandas numpy

Parquet input also needs pyarrow or fastparquet. Inputs may be CSV, Parquet, JSON, JSONL, or NDJSON.


Required Inputs

Minimum:

  • Walk-forward metrics (pipeline JSON or fold table)
  • Predictions + actuals with stable reconciliation keys and a fold/season label; team, opponent, and home/away context when those slices are needed
  • Baseline metrics on the same folds
  • Leakage audit status

Optional:

  • Feature matrix used at fit time
  • Coefficients / importances
  • Calibration table

Analysis Workflow

Do not skip.

  1. Confirm evaluation is walk-forward (not in-sample flex).
  2. Restate global metrics with baseline before any story.
  3. Confirm leakage status is CLEAN (or stop).
  4. Slice errors by season, home/away, probability bins, margin buckets.
  5. List largest misses with context (favorite blown out, early season, etc.).
  6. Read drivers carefully
    • linear: coefficients with scale/standardization caveats
    • trees: slice stability over one importance bar chart
  7. Check calibration context for probability models.
  8. Write limits — what interpretation cannot claim.
  9. Hand off to results-reporting / model-card / next experiment.

Slice Menu (do at least two)

SliceQuestion
Season / foldDoes one year carry the mean?
Home vs awayIs edge only one side of the panel?
Probability tailsAre 10% and 90% calls reliable?
Early season (pre_games_played low)Cold-start failure?
Large absolute elo_diff or form gapDoes it fail on “easy” games too?
Blowout residuals (margin)Systematic scale miss?

Guide: slice_guide.md Methods: interpretation_methods.md Use miss_taxonomy.md when classifying large errors and deciding which failures suggest data repair, a new feature, drift handling, or no action.


Standalone Helpers

bash
python /path/to/model-interpretation/scripts/slice_errors.py \
  --input held-out-predictions.csv --slice-cols fold --out slices.json

python /path/to/model-interpretation/scripts/largest_misses.py \
  --input held-out-predictions.csv \
  --columns fold,source_row --top 25

The defaults (y_true, logistic_probability, and the fold slice) match the prediction artifact emitted by predictive-modeling/scripts/run_fold_table.py. Use --actual-col, --prob-col, and --slice-cols for another candidate or schema. Preserve context fields with the predictive helper's --id-cols if you need team, opponent, or home/away slices. The scripts validate binary outcomes and probability bounds. For symmetric team-game artifacts, add --filter-col is_home --filter-value 1 so each event is evaluated once.

These helpers cover probability-error tables only. Coefficient scaling, permutation importance, causal interpretation, margin residuals, and model stability require the external model artifacts and methods described below; the bundled scripts do not compute them.


Coefficient / Driver Rules

Logistic / linear

  • Report direction + magnitude with feature scale
  • Standardized features: coefficient is per-SD effect
  • Do not call it causal without design
  • Check VIF / collinearity before story-time (form diffs often collinear)

Trees / GBM

  • Prefer permutation importance on held-out folds if used at all
  • Require stability across seasons before believing a top feature
  • A pretty importance chart is not lift

Elo models

  • elo_diff dominating is expected — say so
  • Interpretation is mostly “rating gap + home,” not mysterious structure

Largest Misses Protocol

For each miss report:

  1. season, week/date, team, opponent, is_home
  2. y vs p_hat (or margin residual)
  3. model edge (favorite/underdog)
  4. simple context features (form gap, elo gap, rest if present)
  5. whether this miss type clusters

Never only show the funniest blowup.


Hard Constraints

  1. Never interpret a model that failed leakage.
  2. Never treat coefficient sign as causal without design.
  3. Never hide slices where the model loses.
  4. Probability tails need calibration context.
  5. One season hero story is not generalization.
  6. Global metric + baseline must appear before narrative.
  7. If slices conflict with the mean story, the mean story is incomplete.

Anti-Patterns

  • Feature importance theater without metric lift
  • Explaining noise as narrative
  • Only best-case slices
  • Confusing form features with “true team quality”
  • Post-hoc story after seeing test labels without labeling it post-hoc
  • “The model understands matchups” without slice evidence

Reporting Template

text
Model:
Sport / target / T:
Walk-forward window:
Global metrics vs baseline:
Leakage status:
Slices:
  - season:
  - home/away:
  - tails:
Largest misses:
Stable drivers:
Unstable / discarded stories:
Limits:
Next test:

Output Contract

Done means:

  • Global metrics restated with baseline
  • Leakage status stated
  • At least two slices reported
  • Largest misses listed with context
  • Driver claims caveated
  • Limits of interpretation stated
  • Next test named if follow-up needed

Worked Example

NFL form logistic, 2018–2024 walk-forward

  1. Mean log-loss beats constant → proceed
  2. Leakage CLEAN
  3. Slice by season: check if 2020 or one year carries it
  4. Slice home/away: both should beat constant if the model is real
  5. Tails: run calibration-check/scripts/calibration_report.py and inspect bin counts
  6. Largest misses: road dogs that won, or huge favorites that lost
  7. Writeup: “beats constant on most folds; weak on early-season low-sample rows”

Bundled Resources

references/

scripts/

  • slice_errors.py
  • largest_misses.py

Related Skills

  • results-reporting
  • calibration-check
  • model-card
  • predictive-modeling
  • statistical-modeling
  • experiment-log

Quick Command Card

bash
python /path/to/model-interpretation/scripts/slice_errors.py \
  --input held-out-predictions.csv --slice-cols fold --out slices.json

python /path/to/model-interpretation/scripts/largest_misses.py \
  --input held-out-predictions.csv \
  --columns fold,source_row --top 25

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 Model Interpretation?

Interpretéiert Sportmodeller mat Hëllef vun zeréckbehalene Prognosen, Koeffizienten, Feeleranalysen, de gréisste Feeler, dem Kontext vun der Kalibratioun a Stabilitéitskontrollen. Benotzt dës Skill no enger zäitbewosster Evaluatioun, wann Dir erkläre wëllt, wat e Modell beaflosst a wou e scheitert.

Firwat Model Interpretation op TypingMind benotzen?

Well Dir en eemol installéiert a mat all Modell benotze kënnt. Model Interpretation 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 Model Interpretation an TypingMind?

Maacht an TypingMind Plugins → Skills → Vu GitHub installéieren op a setzt https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/model-interpretation 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 Model Interpretation 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 Model Interpretation benotzen?

Esou vill wéi Dir wëllt. Soulaang e Modell Skills ënnerstëtzt, kënnt Dir Model Interpretation 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 Model Interpretation 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 👇