Member-only story
Machine learning basics (part 11): Nearest neighbor searching
5 min readMay 17, 2022
Foundation of nearest neighbors
At first, let us look at the theoretical background (in a simplified way) on the probabilistic basis. Suppose we place a region of volume V and x is a vector representing the case for which k nearest neighbors are searched for. V is the volume of the variable space comprising all training cases. Let us assume that searching for neighbors yields k cases (samples, examples or observations), k_i of which are from class c_i .