<aside> 💡

As we discussed earlier in the module, feature scaling is the process of standardising or normalising numerical input variables to ensure that they are on a similar scale.

</aside>

While logistic regression does not require feature scaling for model accuracy (since it’s not distance-based like k-NN or Support Vector Machines), scaling can still improve optimisation and model performance in certain scenarios.

Why is Feature Scaling Important?

  1. Improves Convergence Speed – logistic regression is trained using gradient descent, which can be slow when features have vastly different scales. Scaling helps gradient descent converge faster and more smoothly.
  2. Prevents Numerical Instability – large feature values can cause computational issues when calculating the log odds in logistic regression. Scaling reduces this risk.
  3. Enhances Interpretability with Regularisation – when using L1 (Lasso) or L2 (Ridge) regularisation, scaling ensures that all features contribute equally to the penalty term, preventing features with larger magnitudes from dominating the model.

Common Feature Scaling Methods

When to Scale Features in Logistic Regression

While not always necessary, feature scaling can improve efficiency and stability, making it a useful pre-processing step in logistic regression.


Next reading:

Interaction terms