brier_score#
- scikitplot.corpus.brier_score(y_true, y_prob)[source]#
Mean squared difference between probabilities and binary outcomes.
- Parameters:
- y_truearray-like of shape (n_samples,)
Binary relevance labels.
- y_probarray-like of shape (n_samples,)
Predicted probabilities of relevance.
- Returns:
- float
In
[0, 1]; lower is better.
- Raises:
- ValueError, TypeError
See
reliability_table.
- Parameters:
- Return type:
See also
binary_log_lossPenalises confident mistakes more strongly.
Examples
>>> brier_score([1, 0, 1], [0.9, 0.2, 0.6]) 0.07