For the second project we are using K-NN method. K-nearest neighbors (k-NN) is a non-parametric supervised machine learning algorithm. It is used for classification and regression tasks. In classification, k-NN is used to predict the class of a new data point based on the classes of its k nearest neighbors. In regression, k-NN is used to predict the value of a new data point based on the values of its k nearest neighbors.
Here’s how it works:
- Imagine you have a bunch of data points in space, and each point represents something with certain characteristics.
- When you want to know something about a new data point, KNN looks at the “k” nearest data points to that new point.
- It then checks what those nearest data points are like (their characteristics), and based on the majority opinion of those neighbors, it predicts or classifies the new data point.