Skip to content
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

[MRG] Deprecate lsh forest #9078

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.")

This comment has been minimized.

@ogrisel

ogrisel Jun 9, 2017
Member

Please remove that line. Or making an inline comment instead of an independent UserWarning.

This comment has been minimized.

@ldirer

ldirer Jun 9, 2017
Author Contributor

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 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 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`_.

This comment has been minimized.

@amueller

amueller Jun 9, 2017
Member

the by refers to the person coding, not the issue raiser

@ldirer ldirer force-pushed the ldirer:deprecate-lsh-forest branch from 13c339a to af9da5a Jun 9, 2017
@ogrisel
ogrisel approved these changes Jun 9, 2017
Copy link
Member

@ogrisel ogrisel left a comment

Let's also delete benchmarks/bench_plot_approximate_neighbors.py and +1 on my side.

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

@ldirer ldirer commented Jun 10, 2017

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

@amueller
Copy link
Member

@amueller amueller commented Jun 10, 2017

LGTM, thanks

@amueller amueller merged commit 2a1410b into scikit-learn:master Jun 10, 2017
2 of 3 checks passed
2 of 3 checks passed
continuous-integration/appveyor/pr AppVeyor build failed
Details
ci/circleci Your tests passed on CircleCI!
Details
continuous-integration/travis-ci/pr The Travis CI build passed
Details
Sundrique added 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 added 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 added 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 added 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 added 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 added 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 added 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
Projects
None yet
Linked issues

Successfully merging this pull request may close these issues.

3 participants
You can’t perform that action at this time.