Skip to content

Comments

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

Merged
NelleV merged 2 commits intoscikit-learn:masterfrom
jrbourbeau:fix_cross_val_predict_NotFittedError
Aug 30, 2017
Merged

[MRG + 1] Removes estimator method check in cross_val_predict before fitting#9641
NelleV merged 2 commits intoscikit-learn:masterfrom
jrbourbeau:fix_cross_val_predict_NotFittedError

Conversation

@jrbourbeau
Copy link
Contributor

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

Can you add your minimum example as a test please?

@jrbourbeau
Copy link
Contributor Author

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

@amueller
Copy link
Member

yes :)

@amueller
Copy link
Member

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

Awesome, thanks @amueller !

@NelleV
Copy link
Member

NelleV commented Aug 30, 2017

Thanks @jrbourbeau

@NelleV NelleV merged commit 8f89478 into scikit-learn:master Aug 30, 2017
@jnothman jnothman added this to the 0.19.1 milestone Aug 30, 2017
@jnothman
Copy link
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.

jnothman pushed 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 fix_cross_val_predict_NotFittedError branch August 30, 2017 01:46
@jrbourbeau
Copy link
Contributor Author

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

@jnothman
Copy link
Member

maskani-moh pushed 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
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.

4 participants