matloff / matloff/R-vs.-Python-for-Data-Science
Nearest neighbor in python
Nobody has claimed this yet.
- Dominant language
- No language data
- Stars
- 448
- Forks
- 40
- PR merge metrics
- No merged PRs in 30d
Description
For example, I once needed code to do fast calculation of nearest-neighbors of a given data point
First google hit for "nearest neighbor" is scikit-learns k nearest neighbor classifier, which links to the BallTree and KDTree classes it uses for neighbor finding:
- https://scikit-learn.org/stable/modules/neighbors.html
- https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.BallTree.html#sklearn.neighbors.BallTree
- https://scikit-learn.org/stable/modules/generated/sklearn.neighbors.KDTree.html#sklearn.neighbors.KDTree
Little more googling about those algorithms gives you:
Also, researching nearest neighbors in generall, will give you the answer, that a KDTree is one of the most efficient algorithms to do this and googling
kdtree python will yield the scipy implementation as first hit.
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Review the linked scikit-learn neighbors documentation and the BallTree, KDTree, and cKDTree references first. The issue names no repository file, test, implementation scope, or acceptance criteria, so clarify the intended Python change and its completion criteria before coding.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- python, scikit-learn
- Domain
- machine-learning
- Issue type
- Feature
- Difficulty
- 5/5
- Estimated time
- Over a week
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 15/100