Skip to main content
Tweeted twitter.com/StackStats/status/1118756206917636096
Became Hot Network Question
edited title
Link

How to ComputerCompute the Brier Score for more than Two Classes

edited tags; edited tags; edited tags
Link
Stephan Kolassa
  • 130.7k
  • 22
  • 264
  • 497
deleted 16 characters in body
Source Link

oneOne hot vectors represent which class is present in a given item of data:

vectorsVectors of probabilities represent the outputs of my classifiers, assigning a probability to each class

When I program this in pythonPython and run it on the above targets and probs matrices, I get a result of $1.0069$

>>> def brier_binbrier_bin_(targets, probs):
...     return np.averagemean((targets - probs) ** 2, weights=None)
>>> brier_bin(targets[:,2], probs[:,2])
0.13272999999999996

one hot vectors represent which class is present in a given item of data:

vectors of probabilities represent the outputs of my classifiers, assigning a probability to each class

When I program this in python and run it on the above targets and probs matrices, I get a result of $1.0069$

>>> def brier_bin(targets, probs):
...     return np.average((targets - probs) ** 2, weights=None)
>>> brier_bin(targets[:,2], probs[:,2])
0.13272999999999996

One hot vectors represent which class is present in a given item of data:

Vectors of probabilities represent the outputs of my classifiers, assigning a probability to each class

When I program this in Python and run it on the above targets and probs matrices, I get a result of $1.0069$

>>> def brier_bin_(targets, probs):
...     return np.mean((targets - probs) ** 2)
>>> brier_bin(targets[:,2], probs[:,2])
0.13272999999999996
Source Link
Loading