Definition

Suppose is the distance between the training sample and the given point . Let

The k-NN determines a sample’s class using the -nearest training datum.

Facts

and are hyperparameters.