Learn Before
Concept
Regression Process of K-Nearest Neighbors
For regression problems, a K value is first chosen, as well as a prediction point (). The algorithm starts off by finding the K training observations that are closes to . These training observations are denoted by . In order to find , or the response value of your predicted point, KNN uses the average of the training observations in . To do this, it does the following:
- Depending on the value of k, it finds the distance (typically Euclidean) between it and the other observations.
- It then chooses the k closest observations based on this distance ().
- The response values of the chosen k observations are averaged to predict the output of .
Formally, the equation for this process is:
0
2
Updated 2020-04-05
Tags
Data Science