Skip to content
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

Conversation

@jrbourbeau
Copy link
Contributor

@jrbourbeau 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
Copy link
Member

@amueller amueller commented Aug 28, 2017

Can you add your minimum example as a test please?

@jrbourbeau
Copy link
Contributor Author

@jrbourbeau 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
Copy link
Member

@amueller amueller commented Aug 28, 2017

yes :)

@amueller
Copy link
Member

@amueller amueller commented Aug 28, 2017

thanks, lgtm :)

@amueller amueller changed the title Removes estimator method check in cross_val_predict before fitting [MRG + 1] Removes estimator method check in cross_val_predict before fitting Aug 28, 2017
@jrbourbeau
Copy link
Contributor Author

@jrbourbeau jrbourbeau commented Aug 28, 2017

Awesome, thanks @amueller !

@NelleV
Copy link
Member

@NelleV NelleV commented Aug 30, 2017

Thanks @jrbourbeau

@NelleV NelleV merged commit 8f89478 into scikit-learn:master Aug 30, 2017
6 checks passed
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
Copy link
Member

@jnothman 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
…fitting (scikit-learn#9641)

* Removes check in cross_val_predict that checks estimator method before fitting

* Adds regression test for issue scikit-learn#9639
@jrbourbeau jrbourbeau deleted the jrbourbeau:fix_cross_val_predict_NotFittedError branch Aug 30, 2017
@jrbourbeau
Copy link
Contributor Author

@jrbourbeau jrbourbeau commented Aug 30, 2017

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

maskani-moh added a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
…fitting (scikit-learn#9641)

* Removes check in cross_val_predict that checks estimator method before fitting

* Adds regression test for issue scikit-learn#9639
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
…fitting (scikit-learn#9641)

* Removes check in cross_val_predict that checks estimator method before fitting

* Adds regression test for issue scikit-learn#9639
@rth rth mentioned this pull request Aug 3, 2018
2 of 4 tasks complete
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

None yet

4 participants