[MRG] Update NeighborsBase 'auto' heuristic#17148
Merged
rth merged 14 commits intoscikit-learn:masterfrom Jun 23, 2020
Merged
Conversation
Change for tree-based methods when available and number of features <= 15 otherwise brute force. Fix test using `algorithm='auto'` assuming 'auto' will select 'brute'. Update "1.6.4.4. Choice of Nearest Neighbors Algorithm" user guide section. Resolves: scikit-learn#8213
amueller
reviewed
May 11, 2020
Member
|
Should we have some basic tests that the heuristic is actually used? |
amueller
reviewed
May 13, 2020
amueller
approved these changes
May 13, 2020
Member
|
ping @rth ? |
Contributor
Author
You meant |
Add the previous heuristic to the new one instead of latter replacing the former. Update test and user guide.
rth
reviewed
May 14, 2020
Rephrase with bullets for readability
rth
reviewed
May 15, 2020
rubywerman
pushed a commit
to MLH-Fellowship/scikit-learn
that referenced
this pull request
Jun 24, 2020
jayzed82
pushed a commit
to jayzed82/scikit-learn
that referenced
this pull request
Oct 22, 2020
Closed
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Reference Issues/PRs
Fixes #8213
What does this implement/fix? Explain your changes.
Fix the current
NearestNeighbors'auto' heuristic which fails when the number of features is too high.This change propose to choose tree-based methods when available and number of features doesn't exceed 15, otherwise to choose brute force.
Additional context
Benchmarks run and analysed here.
Read also #8213 discussion