Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Appearance settings

Fix Calibrated classifier cv predictions with pipeline #19641

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

Merged

Conversation

AlekLefebvre
Copy link
Contributor

@AlekLefebvre AlekLefebvre commented Mar 7, 2021

Reference Issues/PRs

Fixes #19637, #8710.

What does this implement/fix? Explain your changes.

As suggested in #19641, this PR removed validation from the CalibratedClassifierCV predict_proba function and replaced X.shape[0] with _num_samples(X).

Regression testing has also been added.

Any other comments?

Copy link
Member

@thomasjpfan thomasjpfan left a comment

Choose a reason for hiding this comment

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

Thank you for the PR @AlekLefebvre !

Please add an entry to the change log at doc/whats_new/v1.0.rst with tag |Fix|. Like the other entries there, please reference this pull request with :pr: and credit yourself (and other contributors if applicable) with :user:.

sklearn/tests/test_calibration.py Outdated Show resolved Hide resolved
sklearn/calibration.py Show resolved Hide resolved
sklearn/calibration.py Show resolved Hide resolved
sklearn/tests/test_calibration.py Outdated Show resolved Hide resolved
Copy link
Member

@NicolasHug NicolasHug left a comment

Choose a reason for hiding this comment

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

Thanks @AlekLefebvre , some minor comments but LGTM!

sklearn/tests/test_calibration.py Outdated Show resolved Hide resolved
sklearn/calibration.py Show resolved Hide resolved
doc/whats_new/v1.0.rst Outdated Show resolved Hide resolved
Copy link
Member

@ogrisel ogrisel left a comment

Choose a reason for hiding this comment

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

LGTM as well.

Here is just a quick formatting commit about docstring formating. I will merge once green.

sklearn/tests/test_calibration.py Outdated Show resolved Hide resolved
@ogrisel ogrisel merged commit ad7c316 into scikit-learn:main Mar 10, 2021
@ogrisel
Copy link
Member

ogrisel commented Mar 10, 2021

Thank you very much @AlekLefebvre !

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

Successfully merging this pull request may close these issues.

CalibratedClassifier on pipelines
4 participants
Morty Proxy This is a proxified and sanitized view of the page, visit original site.