Nearest Neighbors Algorithms in Machine learning

DarkProgrammerPB
Nov 6 · 2 min read

We will try to understand BallTree and KDTree algorithms used in both K-Neighbors Classifer and K-Neighbors Regressor. The main focus will be towards understanding both the algorithms on a small data without using any programming language and then understanding what the parameters and attributes mentioned in KNeighborsClassifier and KNeighborsRegressor actually mean

Ball Tree Algorithm :- We will look at Ball Tree algorithm by following the paper written by Ting Liu, Andrew W. Moore and Alexander Gray which explains how a ball tree algorithm actually performs

We will now try to understand various parameters mentioned in the KNeighborsClassifier Module of sklearn

KD Tree :- We will now shift our focus from Ball Tree algorithm to KD Tree algorithm.

References:-

  1. http://www.jmlr.org/papers/volume7/liu06a/liu06a.pdf (for Ball Tree)
  2. https://scikit-learn.org/stable/modules/neighbors.html#classification
  3. https://www.geeksforgeeks.org/k-dimensional-tree/ (For KD Tree)

PS:- This is my first blog and my aim was to make things as simpler as possible. Any comments, improvements and suggestions are always welcome. I am pretty old-school and tend to write things on paper before applying them anywhere so pardon me if the text content was less and images were more.

I will be posting the necessary code associated with this soon.

Welcome to a place where words matter. On Medium, smart voices and original ideas take center stage - with no ads in sight. Watch
Follow all the topics you care about, and we’ll deliver the best stories for you to your homepage and inbox. Explore
Get unlimited access to the best stories on Medium — and support writers while you’re at it. Just $5/month. Upgrade