-
-
Notifications
You must be signed in to change notification settings - Fork 25.8k
[MRG] Deprecate lsh forest #9078
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
Conversation
sklearn/neighbors/approximate.py
Outdated
@@ -217,6 +217,10 @@ def __init__(self, n_estimators=10, radius=1.0, n_candidates=50, | |||
self.min_hash_match = min_hash_match | |||
self.radius_cutoff_ratio = radius_cutoff_ratio | |||
|
|||
warnings.warn("LSHForest has poor performance.") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Please remove that line. Or making an inline comment instead of an independent UserWarning.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
The original issue mentioned
LSHForest should be deprecated and scheduled for removal in 0.21. It should also warn about having bad performance
I could make the deprecation warning:
LSHForest has poor performance and has been deprecated in 0.19. It will be removed in version 0.21.
Remaining TODOs:
|
I removed the section on approximate neighbors entirely, but I'm having second thoughts about it. If we go ahead and remove it I'll mention in the relevant PRs (that allow ANN, I think PR #8999 does that) that what we removed can be used as a basis for new documentation. I would have liked to keep some paragraphs but it feels weird to have general considerations that don't relate to any scikit-learn class. |
doc/whats_new.rst
Outdated
@@ -427,6 +427,10 @@ API changes summary | |||
:class:`cluster.bicluster.SpectralBiclustering` now accept ``y`` in fit. | |||
:issue:`6126` by `Andreas Müller`_. | |||
|
|||
- :class:`neighbors.approximate.LSHForest` has been deprecated and will be | |||
removed in 0.21 due to poor performance. | |||
:issue:`8996` by `Andreas Müller`_. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
the by refers to the person coding, not the issue raiser
13c339a
to
af9da5a
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Let's also delete benchmarks/bench_plot_approximate_neighbors.py
and +1 on my side.
af9da5a
to
bb584f9
Compare
Appveyor seems to have randomly failed but otherwise I think it's ready for merge. |
LGTM, thanks |
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
* Add deprecation message and test. * Adding performance warning and ignore_warnings in test * Add deprecation to whatsnew and remove LSHForest references from docs. Removing benchmark for lsh
Reference Issue
Fixes #8996
What does this implement/fix? Explain your changes.
Add a deprecation (removed in 0.21) and performance warning for
LSHForest
.Any other comments?
Since both are linked it would make sense I think. For now I issued 2 separate warnings.
@ignore_warnings
decorator which does not seem to be doing his job in nested function calls: I had to use inline calls toignore_warnings
everywhere, which is not super nice.