All problems
Brier Score Binary
Problem
The Brier score for binary probabilistic predictions is mean_i (p_i - y_i)^2.
Given the predicted probabilities and the binary outcomes, return the Brier score.
Hint
It is the mean squared error of probabilities.
Test cases
case 1
in: [[0.8,0.2],[1,0]]
expected: 0.039999999999999994
case 2
in: [[0.5,0.5,0.5],[1,0,1]]
expected: 0.25
case 3
in: [[1,0],[1,0]]
expected: 0
Starter codePython
def brier_score_binary(probs, outcomes):
# Your code here
pass3 test cases · run your code against them in the editor