+3 votes
446 views
asked in Machine Learning by (1.4k points)  

I have read online articles involving KNN and its emphasis on normalization. I would like to know if all KNN functions in Python need to involve normalization? 

I do know that normalization computes values that are usually between 0 and 1 but would this process be necessary in all python KNN functions or is it specific to certain scenarios?

When dealing with distance, L1 or L2, would normalization be needed?

 

(a few) Blogs / Articles:

Stack Exchange

Stack OverFlow

Vidyha Analytics

  

1 Answer

+1 vote
answered by (160 points)  
Generally, normalization allows features of different natures to be used meaningfully together.  Without it, features would impact the KNN functions proportionately to the magnitude of the numbers that are used to express them.  E.g. GDP per capita would cause unemployment rate to be nearly irrelevant without normalization.

In dealing with distance, all features would share a common "unit" already and are correctly scaled relative to each other, so normalization would not be needed in this instance.

Related questions

+3 votes
2 answers 12.1k views
+1 vote
1 answer 2.3k views
+1 vote
3 answers 2.7k views
+3 votes
0 answers 212 views
...