[MRG] Deprecate lsh forest#9078
Conversation
sklearn/neighbors/approximate.py
Outdated
| 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.
Please remove that line. Or making an inline comment instead of an independent UserWarning.
There was a problem hiding this comment.
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. |
|
|
||
| - :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.
the by refers to the person coding, not the issue raiser
13c339a to
af9da5a
Compare
ogrisel
left a comment
There was a problem hiding this comment.
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_warningsdecorator which does not seem to be doing his job in nested function calls: I had to use inline calls toignore_warningseverywhere, which is not super nice.