/  Top Machine learning interview questions and answers   /  Explain KNN classifier?
KNN-classifier-1-i2tutorials

Explain KNN classifier?

The KNN algorithm assumes that similar things exist in close proximity. Which means, similar things are near to each other. KNN captures the idea of similarity with some mathematics, calculating the distance between points on a graph.

It should also be noted that all three distance measures are only valid for continuous variables. In case of categorical variables, the Hamming distance must be used. It also brings up the problem of standardization of the numerical variables between 0 and 1 when there is a mixture of numerical and categorical variables in the dataset.

KNN-classifier-2-i2tutorials

Leave a comment