Use feature scaling to interpret a step

Check signs and decimal points before moving to the next value. · 180 words

Feature scaling expresses inputs in more comparable units, often by centering and dividing by a spread. It changes the coordinate system, not the information. Consider a logistic model for buying a concert ticket: y = 1 means buy, x1 = 2 rating points, x2 = 1000 dollars, and both weights start at zero. The prediction p = 1/(1 + exp(-(w1*x1 + w2*x2))) is 0.5. For log loss, a penalty for wrong probabilities, each weight gradient is (p - y)*x. Thus the gradients are -1 and -500. With eta = 0.001, w1 becomes 0.001 and w2 becomes 0.5.

Now set z1 = x1/2 = 1 and z2 = x2/1000 = 1, and write the model with z. At zero weights, p is still 0.5, but each gradient is (0.5 - 1)*1 = -0.5. The same step gives b1 = b2 = 0.0005. Both scaled coefficients move equally, so steps can be compared without confusing input units with importance. The unscaled gradients differed because the dollar feature spans 1,000 units. Scaling usually improves optimization, but validation loss and calibration still determine quality.

Check your recall

After scaling x1 by 2 and x2 by 1000, what are the two gradients and the updated scaled weights?

Check your answer

Both scaled features equal 1, so each gradient is (0.5 - 1)*1 = -0.5. With eta = 0.001, both weights become 0 - 0.001*(-0.5) = 0.0005.

Sources and credits

Original KeyTouch lesson. Background reading · Google · Linear regression.