Skip to content

[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

Merged
merged 3 commits into from
Jun 10, 2017
Merged

Conversation

ldirer
Copy link
Contributor

@ldirer ldirer commented Jun 9, 2017

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?

  • I could use help on a better message for performance warning ;).
  • Should we put the performance warning message in the deprecation message?
    Since both are linked it would make sense I think. For now I issued 2 separate warnings.
  • I'm puzzled by the @ignore_warnings decorator which does not seem to be doing his job in nested function calls: I had to use inline calls to ignore_warnings everywhere, which is not super nice.

@ldirer ldirer changed the title Deprecate lsh forest [WIP] Deprecate lsh forest Jun 9, 2017
@@ -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.")
Copy link
Member

@ogrisel ogrisel Jun 9, 2017

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.

Copy link
Contributor Author

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.

@ogrisel
Copy link
Member

ogrisel commented Jun 9, 2017

Remaining TODOs:

  • remove any reference to LSHForest in the narrative documentation, API documentation and examples.
  • update whats_new.rst to mention the deprecation.

@ldirer
Copy link
Contributor Author

ldirer commented Jun 9, 2017

I removed the section on approximate neighbors entirely, but I'm having second thoughts about it.
I think it's informative (beyond what's implemented in scikit-learn).

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.

@ldirer ldirer changed the title [WIP] Deprecate lsh forest [MRG] Deprecate lsh forest Jun 9, 2017
@@ -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`_.
Copy link
Member

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

@ldirer ldirer force-pushed the deprecate-lsh-forest branch from 13c339a to af9da5a Compare June 9, 2017 14:45
Copy link
Member

@ogrisel ogrisel left a 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.

@ldirer ldirer force-pushed the deprecate-lsh-forest branch from af9da5a to bb584f9 Compare June 9, 2017 16:24
@ldirer
Copy link
Contributor Author

ldirer commented Jun 10, 2017

Appveyor seems to have randomly failed but otherwise I think it's ready for merge.

@amueller
Copy link
Member

LGTM, thanks

@amueller amueller merged commit 2a1410b into scikit-learn:master Jun 10, 2017
Sundrique pushed a commit to Sundrique/scikit-learn that referenced this pull request Jun 14, 2017
* 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
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
* 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
dmohns pushed a commit to dmohns/scikit-learn that referenced this pull request Aug 7, 2017
* 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
NelleV pushed a commit to NelleV/scikit-learn that referenced this pull request Aug 11, 2017
* 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
paulha pushed a commit to paulha/scikit-learn that referenced this pull request Aug 19, 2017
* 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
AishwaryaRK pushed a commit to AishwaryaRK/scikit-learn that referenced this pull request Aug 29, 2017
* 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
maskani-moh pushed a commit to maskani-moh/scikit-learn that referenced this pull request Nov 15, 2017
* 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
jwjohnson314 pushed a commit to jwjohnson314/scikit-learn that referenced this pull request Dec 18, 2017
* 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
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.

Deprecate LSHForest
3 participants