IBM / UQ360

Uncertainty Quantification 360 (UQ360) is an extensible open-source toolkit that can help you estimate, communicate and use uncertainty in machine learning model predictions.
https://uq360.res.ibm.com/
Apache License 2.0
257 stars 61 forks source link

Multi-Class Brier Score implementation has issues #14

Closed jwen307 closed 3 years ago

jwen307 commented 3 years ago

The implementation of the multi-class Brier score makes all the targets 1 instead of creating a one-hot vector for each sample. I changed the code to for i in range(len(y_true)):   y_target[i, y_true[i]] = 1.0

instead of y_target[:, y_true] = 1.0

pronics2004 commented 3 years ago

@jwen307 Thanks for catching that!

Would this be a better fix:

y_target[np.arange(y_true.size), y_true] = 1.0 instead of looping?

You are welcome to create a PR for this fix!