Skip to content

Surface the per-bin calibration gap; tidy report construction - #22

Merged
JuneQQQ merged 1 commit into
mainfrom
fix/calibration-review-followups
May 19, 2026
Merged

Surface the per-bin calibration gap; tidy report construction#22
JuneQQQ merged 1 commit into
mainfrom
fix/calibration-review-followups

Conversation

@JuneQQQ

@JuneQQQ JuneQQQ commented May 19, 2026

Copy link
Copy Markdown
Owner

Summary

Three follow-ups from the code review of #21 (copilot calibration). No behaviour
change to the metrics — purely surfacing and tidying.

  • Surface the per-bin calibration gap. CalibrationBin.gap (predicted minus
    observed) was computed and tested but never displayed. The reliability diagram
    now shows it in render(), to_markdown() and the CLI table — it is the most
    informative number per bin (it is the calibration error, by bin).
  • Build the report in one place. _score() now takes n_games /
    n_players and returns a complete CalibrationReport, instead of the caller
    patching two fields onto the object afterwards.
  • Doc note. evaluate_copilot's docstring now states that calibration is
    measured against games played by agent_factory, so results depend on the
    agents used.

Checklist

  • ruff / mypy / pytest (83 tests) all pass
  • No metric changes — only presentation and internal tidy-up

Follow-ups from a review of the copilot-calibration code (#21):

- the reliability diagram now shows each bin's calibration gap (predicted
  minus observed) in render(), to_markdown() and the CLI table — it is the
  most informative number per bin and CalibrationBin.gap already computed it
  but nothing displayed it.
- _score now builds the CalibrationReport in one place: n_games / n_players
  are threaded in rather than patched onto the object by the caller.
- evaluate_copilot's docstring notes that calibration is measured against
  games played by agent_factory, so results depend on the agents used.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@JuneQQQ
JuneQQQ merged commit 85dbea0 into main May 19, 2026
4 checks passed
@JuneQQQ
JuneQQQ deleted the fix/calibration-review-followups branch May 19, 2026 04:31
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant