Machine Learning Technique K-Nearest Neighbors (K-NN) : Dr. Gaurav Dixit
Machine Learning Technique K-Nearest Neighbors (K-NN) : Dr. Gaurav Dixit
1
k-NEAREST NEIGHBORS (k-NN)
• k-NN
– No assumptions about the form of relationship between outcome
variable and the set of predictors
– Non-parametric method
• No parameters from the assumed functional form to estimate
– Useful information for modeling is extracted using the similarities
between the records based on predictors' values
• Typically, distance based similarity measures are used
2
k-NEAREST NEIGHBORS (k-NN)
3
k-NEAREST NEIGHBORS (k-NN)
• k-NN
– Scaling of predictors: standardized values of predictors
• k-NN for Classification task
– Main idea is to find k records in the training partition which are
neighboring the new observation to be classified
– These k neighbors are used to classify the new observation into a class
• Predominant class among the neighbors
4
k-NEAREST NEIGHBORS (k-NN)
• Open RStudio
5
Key References
6
Thanks…