Search code examples
python-2.7scikit-learnclassificationknn

Normalization in Scikit-learn KNN


I want to use KNN Algorithm in Sklearn. In KNN it's standard to do data normalization to remove the more effect that features with a larger range have on the distance. What I wanted to know, is that is this automatically done in Sklearn or I should normalize the data myself?


Solution

  • It is not automatically done in sklearn. However sklearn provides tools to help you normalize your data, which you can use in sklearn's pipelines.