K-Nearest Neighbors
In statistics, the
- In
-NN classification, the output is a class membership. An object is classified by a plurality vote of its neighbors, with the object being assigned to the class most common among its k nearest neighbors (k is a positive integer, typically small). If , then the object is simply assigned to the class of that single nearest neighbor. - In
-NN regression, the output is the property value for the object. This value is the average of the values of k nearest neighbors. If , then the output is simply assigned to the value of that single nearest neighbor.
Illustration
If
