K-NN(the k-nearest neighbors algorithm)
It’s a nonparametric statistics (instance-based)used for classification and regression(robust and versatile) and the simplest Supervised machine learning algorithm mostly used for classification. KNN is based on feature similarity. Data used in K-NN should better be Labeled, Noise-free and Small data set
Initialize K: Choosing different K values may influence the accuracy of the model. If the K is too small, the noise will influence the prediction greatly. However, a large one will make it computationally expensive. Usually, we set it as the square root of nor an odd number.
Feature | Output |
---|---|
Classification | Class(Discrete value) |
Regression | Value(real number) |
Feature | Input | Output | <
---|