Skip to content

WIP: Calibration plot #882

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Closed
wants to merge 4 commits into from
Closed

Conversation

mblondel
Copy link
Member

@mblondel mblondel commented Jun 2, 2012

I've started to play with calibration plots. I added an example: examples/plot_calibration.py.

I would like to get feedback from people who are familiar with the subject (especially @alextp and maybe @paolo-losi?).

On small and even not so small datasets, I'm often getting empty bins (meaning that some ranges of probabilities are never predicted by the classifier). To get smoother plots, I was thinking I could use polynomial regression but there's a risk of overfitting since the number of bins is small.

This is a work-in-progress: I won't have time to add tests and documentation anytime soon.

def brier_score(y_true, y_prob):
"""Compute the Brier score.

The smaller the Brier score, the better.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

that's a bit against the scikit convention where all score functions want to be maximized

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hum, you're right. I didn't pay attention because the name of this metric is Brier score.

@ogrisel
Copy link
Member

ogrisel commented Jun 4, 2012

Could you add some documentation on what a calibration plot is and what is it useful for?

@mblondel
Copy link
Member Author

My commits have been included in @agramfort 's PR #1176, so I'm closing this one.

@mblondel mblondel closed this Sep 29, 2012
@GaelVaroquaux
Copy link
Member

My commits have been included in @agramfort 's PR #1176, so I'm closing this
one.

Thanks for cleaning up. I find that it's challenging to keep track of
everything that's going on with the scikit.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants