Feature Scaling

A distance calculation can be dominated by a feature simply because its numbers are larger. We will look at how scaling changes that calculation and why some models are affected more than others.

14 sections · 13 questions · 4 coding challenges

1 / 14

Why Should Changing Units Change a Model?

BOTIE

Suppose we record the same height in metres and then in centimetres. The person has not changed, but the number has. If a model uses raw distances or takes the same-sized adjustment along every input direction, that choice of units can strongly affect what it does.

As neural networks became practical to train, input preparation became an explicit part of training advice. LeCun and colleagues' 1998 Efficient BackProp discussed centring inputs and bringing their scales into a comparable range. The concern was practical: a learning procedure should not struggle merely because one coordinate is expressed with much larger numbers than another.

Scaling gives us a deliberate choice of units. Standardisation uses the training group's mean and spread; other methods choose a fixed interval. This can make distance comparisons more sensible and gradient steps better balanced. We retain the training transformation for later observations, because a new input must be measured with the same ruler as the examples that fitted the model.

Sources for this history