Updated the base.OutlierMixin.fit_predict method docstring #12954
Updated the base.OutlierMixin.fit_predict method docstring #12954jnothman merged 1 commit intoscikit-learn:masterfrom
Conversation
…ze that it performs a fit on X before returning the predictions on X
albertcthomas
left a comment
There was a problem hiding this comment.
Thanks for the clarification.
Note that you always have |
|
@finnoshea have you created an issue for this PR? It's always good idea to open an issue before submitting a PR. |
Ohh yeah, now that I've looked through the code I see that anything that inherits from OutlierMixin (at the very least) will have that functionality. But I spent way too long trying to squash a bug because of my misunderstanding of what fit_predict did. |
|
@nixphix I don't think there's anything wrong with just creating a pull request for this kind of change |
|
Thanks @finnoshea |
…string (scikit-learn#12954)" This reverts commit 27bac67.
…string (scikit-learn#12954)" This reverts commit 27bac67.
to emphasze that it performs a fit on X before returning the predictions on X
Reference Issues/PRs
What does this implement/fix? Explain your changes.
The docstring for OutlierMixin.fit_predict in sklearn/base.py only says that it makes predictions on X and not that it also performs a fit first. I have modified the docstring to show that it does perform the fit first. Somewhere I got the idea that fit_predict was for predictions on the data that was fit, but it is obviously not.
Any other comments?