liveBook · Manning

Feature scaling

As explained in Ensemble Methods for Machine Learning

Feature scaling transforms input variables so their numerical magnitudes are placed on comparable scales.

Feature scaling transforms input variables so their numerical magnitudes are comparable. This matters when interpreting linear models: a wide-ranging variable such as salary can dominate a narrower variable such as age, distorting the apparent importance of model weights. section 9.1.3

Use scaling to support fairer learning and interpretation:

  • Place features in the same numerical range before training a robust linear model. section 9.1.3
  • Interpret weights cautiously when features retain substantially different magnitudes. section 9.1.3
  • Pair scaling with sparse linear models when comparing which features receive zero or nonzero weights. section 9.1.3

Breast-cancer diagnosis

A logistic-regression workflow loads breast-cancer data, applies StandardScaler to X, trains the model, and evaluates predictions. Scaling makes the learned feature weights more meaningfully comparable.

How Ensemble Methods for Machine Learning covers it

How deep it goes
Explains scale-driven weight distortion and demonstrates library-based preprocessing, but does not detail scaling formulas.
Examples
Uses age-versus-salary ranges and breast-cancer diagnosis with StandardScaler and logistic regression.
What you can do after
Apply it via scikit-learn before fitting and interpreting logistic regression.
How it connects
Connects feature scaling with logistic regression, linear regression, sparse linear models, and preprocessing.

Also explained in

Compare how 5 books explain feature scaling →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Ensemble Methods for Machine Learning. The section links point to the parts of the book it draws on.