Feature scaling
Feature scaling is the transformation of numerical features to comparable magnitudes, ranges, or distributions for computation or model fitting.
Outlier Detection in Python
A preprocessing technique that transforms feature values so their numerical ranges or dispersions are comparable.
- How it is used
- Makes numeric inputs comparable for distance-sensitive outlier detectors and detector scores comparable for ensembles.
- How deep it goes
- Defines three common scalers, implements robust scaling, and compares sensitivity to an extreme value without establishing a universally best choice.
- Examples
- Uses baseball statistics, a RobustScaler DataFrame transformation, and nearest-neighbor results before and after adding an extreme row.
- What you can do after
- Apply it via scikit-learn scalers to prepare numeric detector inputs and compare ensemble scores.
Read how Outlier Detection in Python explains feature scaling →
Classic Computer Science Problems in Swift: Essential techniques for practicing programmers
Feature scaling is the transformation of a feature's values from an original numeric range to a common scale such as 0 to 1.
- How it is used
- Prepares differently scaled numeric attributes for neural-network classification.
- How deep it goes
- Defines min-max scaling, explains its range alignment, and implements column-wise in-place mutation for two-dimensional Double arrays.
- Examples
- Uses Iris plant measurements and wine attributes as scaled classification inputs.
- What you can do after
- Apply it via normalizeByFeatureScaling to transform a two-dimensional Swift dataset before training.
Cyber Threat Hunting
Feature scaling is the transformation of numerical features to comparable scales so that differences in magnitude do not disproportionately affect computations.
- How it is used
- Prepares numerical data for k-means, other distance-based algorithms, and PCA by preventing feature magnitude from dominating computations.
- How deep it goes
- Explains magnitude bias, Euclidean distance, StandardScaler, and implementation, but does not develop scaling mathematics beyond a simple distance example.
- Examples
- Uses binary app indicators, byte counts, a three-feature distance example, and scaled DataFrames for demonstration.
- What you can do after
- Apply it via scikit-learn's StandardScaler to numerical DataFrame columns and training features before k-means or PCA.
Machine Learning System Design
Feature scaling is the transformation of numerical input features to comparable numerical ranges or scales.
- How it is used
- Places scaling in preprocessing pipelines that transform raw features before model training or prediction.
- How deep it goes
- Identifies scaling as a numeric transformation and contrasts its model-dependent value without deriving procedures or formulas.
- Examples
- Uses a logistic regression pipeline and contrasts scaling with monotonic transformations applied to gradient boosting features.
- What you can do after
- Apply scaling as a numeric preprocessing step and judge whether it fits the chosen model.
Read how Machine Learning System Design explains feature scaling →
Ensemble Methods for Machine Learning
Feature scaling transforms input variables so their numerical magnitudes are placed on comparable scales.
- How it is used
- Preprocesses linear-model inputs so feature magnitudes do not distort learning or interpretation.
- 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.
Read how Ensemble Methods for Machine Learning explains feature scaling →
Related concepts
- min-max normalizationimplemented by · Min-max normalization is a feature-scaling technique that linearly maps numerical values to a specified interval using their minimum and maximum values.
- RobustScaleralternative to · RobustScaler is a scikit-learn transformer that scales features using robust statistics such as the median and interquartile range.
- standardizationincludes · Standardization is the transformation of numerical data by centering and scaling it to a common reference, typically to a mean of zero and a standard deviation of one.
- preprocessingpart of · Preprocessing is the preparation or transformation of data, content, or other inputs into a form suitable for a subsequent computational operation.
- genetic algorithmused by · A genetic algorithm is an evolutionary optimization method that improves a population of candidate solutions through fitness-based selection and variation, often including recombination and mutation.
- StandardScalerimplemented by · StandardScaler is a scikit-learn preprocessing transformer that centers each feature using its fitted mean and scales it using its fitted standard deviation.
These guides are generated from the text of Manning books by Manning's knowledge graph and link to the sections they draw on. The full books are available on liveBook and at manning.com.




