8000 DOC Fix doc of fit_predict in neighbors/_lof.py by yiyange · Pull Request #18754 · scikit-learn/scikit-learn · GitHub
[go: up one dir, main page]

Skip to content

DOC Fix doc of fit_predict in neighbors/_lof.py #18754

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
merged 2 commits into from
Nov 3, 2020

Conversation

yiyange
Copy link
@yiyange yiyange commented Nov 3, 2020

Reference Issues/PRs

Fixes #18739

What does this implement/fix? Explain your changes.

Update the documentation to be consistent with other places as well as the actual logic

if self.novelty:
msg = ('fit_predict is not available when novelty=True. Use '
'novelty=False if you want to predict on the training set.')
raise AttributeError(msg)

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.

Don't worry about the test failing, it's unrelated. Thanks @yiyange !

@NicolasHug NicolasHug changed the title Fix wrong documentation in fit_predict in neighbors/_lof.py DOC Fix doc of fit_predict in neighbors/_lof.py Nov 3, 2020
@NicolasHug NicolasHug merged commit 51acc9d into scikit-learn:master Nov 3, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

Successfully merging this pull request may close these issues.

neighbors' fit_predict is NOT available to novelty detection
2 participants
0