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

[MRG + 1] Removes estimator method check in cross_val_predict before fitting #9641

Merged
merged 2 commits into from Aug 30, 2017

Conversation

Projects
None yet
4 participants
@jrbourbeau
Contributor

jrbourbeau commented Aug 28, 2017

Reference Issue

Fixes issue #9639

What does this implement/fix? Explain your changes.

This PR removes a check in model_selection.cross_val_predict that checks if an estimator has a method before the estimator is fit, causing a NotFittedError to be raised in some cases (e.g. when using SGDClassifier).

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Aug 28, 2017

Member

Can you add your minimum example as a test please?

Member

amueller commented Aug 28, 2017

Can you add your minimum example as a test please?

@jrbourbeau

This comment has been minimized.

Show comment
Hide comment
@jrbourbeau

jrbourbeau Aug 28, 2017

Contributor

Yeah sure. Just a regression test that makes sure SGDClassifier no longer raises an error with cross_val_predict?

Contributor

jrbourbeau commented Aug 28, 2017

Yeah sure. Just a regression test that makes sure SGDClassifier no longer raises an error with cross_val_predict?

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Aug 28, 2017

Member

yes :)

Member

amueller commented Aug 28, 2017

yes :)

@amueller

This comment has been minimized.

Show comment
Hide comment
@amueller

amueller Aug 28, 2017

Member

thanks, lgtm :)

Member

amueller commented Aug 28, 2017

thanks, lgtm :)

@amueller amueller changed the title from Removes estimator method check in cross_val_predict before fitting to [MRG + 1] Removes estimator method check in cross_val_predict before fitting Aug 28, 2017

@jrbourbeau

This comment has been minimized.

Show comment
Hide comment
@jrbourbeau

jrbourbeau Aug 28, 2017

Contributor

Awesome, thanks @amueller !

Contributor

jrbourbeau commented Aug 28, 2017

Awesome, thanks @amueller !

@NelleV

This comment has been minimized.

Show comment
Hide comment
@NelleV
Member

NelleV commented Aug 30, 2017

Thanks @jrbourbeau

@NelleV NelleV merged commit 8f89478 into scikit-learn:master Aug 30, 2017

6 checks passed

ci/circleci Your tests passed on CircleCI!
Details
codecov/patch 100% of diff hit (target 96.16%)
Details
codecov/project 96.16% (+<.01%) compared to 0b8a936
Details
continuous-integration/appveyor/pr AppVeyor build succeeded
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
lgtm analysis: Python No alert changes
Details

@jnothman jnothman added this to the 0.19.1 milestone Aug 30, 2017

@jnothman

This comment has been minimized.

Show comment
Hide comment
@jnothman

jnothman Aug 30, 2017

Member

@jrbourbeau because you wrote "fixes issue #..." and not just "fixes #..." the issue didn't automatically close. Please take care in the future! Thanks for your contributions.

Member

jnothman commented Aug 30, 2017

@jrbourbeau because you wrote "fixes issue #..." and not just "fixes #..." the issue didn't automatically close. Please take care in the future! Thanks for your contributions.

jnothman added a commit to jnothman/scikit-learn that referenced this pull request Aug 30, 2017

[MRG + 1] Removes estimator method check in cross_val_predict before …
…fitting (#9641)

* Removes check in cross_val_predict that checks estimator method before fitting

* Adds regression test for issue #9639

@jrbourbeau jrbourbeau deleted the jrbourbeau:fix_cross_val_predict_NotFittedError branch Aug 30, 2017

@jrbourbeau

This comment has been minimized.

Show comment
Hide comment
@jrbourbeau

jrbourbeau Aug 30, 2017

Contributor

@jnothman will do. I didn't realize that using "fixes #..." automatically closes issues, that's a pretty handy feature!

Contributor

jrbourbeau commented Aug 30, 2017

@jnothman will do. I didn't realize that using "fixes #..." automatically closes issues, that's a pretty handy feature!

@jnothman

This comment has been minimized.

Show comment
Hide comment

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017

[MRG + 1] Removes estimator method check in cross_val_predict before …
…fitting (#9641)

* Removes check in cross_val_predict that checks estimator method before fitting

* Adds regression test for issue #9639

jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017

[MRG + 1] Removes estimator method check in cross_val_predict before …
…fitting (#9641)

* Removes check in cross_val_predict that checks estimator method before fitting

* Adds regression test for issue #9639

@rth rth referenced this pull request Aug 3, 2018

Merged

[MRG+1] DOC Cleaning up what's new for 0.20 #11734

2 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment