Brier Score and Reliability

medium
Unit 13 · Recommenders & Metrics0/3 to milestone

The Brier score is the mean squared error of probability forecasts: 1n∑(pi−yi)2\frac1n\sum (p_i - y_i)^2.

Implement:

  • brier(y, p)
  • reliability_table(y, p, bins=10): split [0, 1] into equal-width bins (a probability of exactly 1.0 goes in the last bin) and return a list of (mean_predicted, observed_rate, count) for non-empty bins in order
#metrics#calibration#probability2 visible + 1 hidden tests
solution.py · Python 3.13
Loading editor…
Run your code to see results. ⌘↵ to run · ⌘⇧↵ to submit
Brier Score and Reliability · TechGradify