KNN With Example
KNN With Example
K-NEAREST-NEIGHBOR
ALGORITHM
K Nearest Neighbor
Classification
K-Nearest Neighbors or KNN is one of the simplest machine
learning algorithms.
◦ easy to implement
◦ easy to understand.
data to this algorithm, the algorithm does not train itself at all.
KNN does not learn any discriminative function from the training
Use the K that gives lowest average error over the N training examples
PROS AND CONS OF KNN
Pros
Cons
Class Task KNN Solved Example Diabetic Patient
Euclidean Distance(L2-
Norm):