Model Interpretation logo

Model Interpretation

Community
WalrusQuant
model-interpretation

Interpret sports models using held-out predictions, coefficients, error slices, largest misses, calibration context, and stability checks. Use after time-aware evaluation when explaining what drives a model and where it fails.

Overview

PublisherWalrusQuant
Repositorysports-analytic-skills
Skill namemodel-interpretation
Stars
53
Forks
4
Bundled files
5
LicenseMIT
Links
  • Markdown instructions

    A SKILL.md file the model loads on demand, so it only costs tokens when a request actually matches.

  • Works with any LLM

    AI skills are plain Markdown, not provider-specific code, so this works with GPT, Claude, Gemini, Grok, or a local model.

  • 5 bundled files

    Scripts, templates, and references the model can read while it works. Files are read-only and never executed.

  • Open source

    Published by WalrusQuant on GitHub. Read the source before you install it.

Installation

Install the Model Interpretation AI skill in TypingMind to use it with any LLM, or drop it into another agent that reads SKILL.md.

1

Install in TypingMind

TypingMind installs a skill straight from its GitHub folder — it reads SKILL.md, bundles the resource files, and stores the result locally.

  1. Open the app and go to Plugins → Skills.
  2. Choose "Install from GitHub".
  3. Paste the skill folder URL below and confirm.
    https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/model-interpretation
  4. Enable the skill in any chat where you want it available.
Plugins → Skills → Add skill → From GitHub URL, then paste the folder URL and press Continue.
2

Install in another agent

Any agent that reads the Agent Skills format can use this skill — copy the folder into that agent's skills directory.

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
Restart Claude Code after copying so it picks up the new skill.

Use it in TypingMind

Enable Model Interpretation in any TypingMind chat and the model takes it from there. Its name and description sit in the system prompt, and the moment a request matches, the model loads the full instructions itself — you never invoke it by hand, and it costs no tokens until it is actually used.

The model loads Model Interpretation on its own as soon as a request matches it.

Works with any AI model

AI skills are plain Markdown instructions rather than provider-specific code, so Model Interpretation is not tied to the model it was written for. Install it once in TypingMind and use it with GPT-5, Claude, Gemini, Grok, DeepSeek, Mistral, Llama, or a local model you run yourself — all on your own API keys.

  • Loaded only when it is needed

    The system prompt carries just the name and description. The instructions are fetched on the first matching request, so an idle skill costs nothing.

  • Switch models mid-chat

    Because the skill is instructions rather than code, changing model does not break it — the next model reads the same SKILL.md.

Skill instructions

This is the SKILL.md content the model loads. Read it before installing — a skill is instructions your model will follow.

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

Bundled files

The model reads these on demand while the skill is loaded. They are exposed as readable files and are never executed.

Frequently asked questions

What does the Model Interpretation AI skill do?

Interpret sports models using held-out predictions, coefficients, error slices, largest misses, calibration context, and stability checks. Use after time-aware evaluation when explaining what drives a model and where it fails.

Why use Model Interpretation on TypingMind?

Because you install it once and use it with any model. Model Interpretation is plain Markdown rather than provider-specific code, so the same skill runs on GPT-5, Claude, Gemini, Grok, or a local model — and you can switch model mid-chat without it breaking. TypingMind runs on your own API keys, so you pay providers directly instead of a per-seat subscription, and your skills and chats stay in your own storage.

How do I install Model Interpretation in TypingMind?

Open Plugins → Skills → Install from GitHub in TypingMind and paste https://github.com/WalrusQuant/sports-analytic-skills/tree/main/skills/model-interpretation. TypingMind reads its SKILL.md and bundles its files and installs it as a skill you can enable per chat.

Which AI models can use Model Interpretation?

Any model you connect in TypingMind. AI skills are plain Markdown instructions rather than provider-specific code, so GPT, Claude, Gemini, Grok, and local models can all load this skill when a request matches it.

How many AI models can I use with Model Interpretation?

As many as you like. As long as a model supports skills, you can use Model Interpretation with it — GPT, Claude, Gemini, Grok, DeepSeek, Mistral, Llama and more — all on TypingMind with your own API keys.

Is the Model Interpretation AI skill free?

Yes. It is published on GitHub by WalrusQuant under the MIT license. You only pay your own AI provider for the tokens you use.

What are AI skills?

An AI skill is a reusable instruction bundle that teaches an AI model how to do one specific task. It follows the open Agent Skills format: a SKILL.md file with a name and description, plus any scripts, templates or reference files the model may need. The model reads the instructions only when your request matches the skill, so an installed skill costs nothing until it is used.

How are AI skills different from plugins or MCP servers?

A plugin or MCP server gives a model new tools to call — code that runs somewhere and returns a result. An AI skill gives the model knowledge and process instead: how to approach a task, which steps to follow, what good output looks like. Skills are plain Markdown, so they need no server, no API key and no runtime, and they work with any model.

View all

Set up your own AI workspace now

Get notified about new features and future giveaways by subscribing to our newsletter 👇