0
$\begingroup$

With feature scaling we just change representation of the data. This can make our model run faster but how this can improve accuracy? It is the same data after all.

When I train my SVM without feature scaling I get an accuracy of %61, after MinMax scaling from sklearn accuracy increases to %96. How is this possible even we work with same data and use the same model?

$\endgroup$

marked as duplicate by Reinstate Monica, mdewey, Michael R. Chernick, mkt - Reinstate Monica, Peter Flom - Reinstate Monica Aug 21 at 12:00

This question has been asked before and already has an answer. If those answers do not fully address your question, please ask a new question.

  • 2
    $\begingroup$ Some models (not all) are sensitive to scale, because they unjustly give more weight to features with bigger scales. Scaling here improves the model because it puts all features on the same scale, giving the model a better chance of finding the right patterns. $\endgroup$ – user2974951 Aug 20 at 10:35
  • 1
    $\begingroup$ A reason it can be possible is because you’re almost never finding a global optimal in machine learning, and for some models having a feature that dominates causes the learning algorithm to get stuck in a bad local optimal solution. $\endgroup$ – Joe Aug 20 at 11:46
3
$\begingroup$

SVM is an algorithm that is based on distances since it tries to maximize the margin between the support vectors.

If one of the features would have much larger values than another it would dominate the distance results and the other feature would have a lesser effect on the result even if it changes significantly.

By scaling the features to the same range, the algorithm would be sensitive to all of them and not biased to the features with the greater magnitude.

$\endgroup$

Not the answer you're looking for? Browse other questions tagged or ask your own question.