Autoscaling
Centering each variable and dividing by its standard deviation, changing the relative weighting of variables rather than correcting every measurement bias.
Definition
Autoscaling, or unit-variance scaling, subtracts each variable's mean and divides the result by that variable's standard deviation: z = (x − mean) / SD. Here SD is the sample standard deviation, with divisor n − 1. Applied to each complete, nonconstant feature column, this gives mean zero and sample variance one. It changes relative variable weighting. [1]
A simple example
Constructed signal values: [10, 12, 14] have mean 12 and sample SD 2. Their scaled values are [−1, 0, 1]. A second column [100, 120, 140] produces exactly the same scaled values. The original tenfold response difference is intentionally removed from this representation.
Common confusion
Column-wise autoscaling is not sample-total normalization, concentration calibration, or batch correction. It gives equal variance, not equal measurement reliability. A weak noisy feature may be amplified; a constant column has SD zero and cannot be scaled by this formula. Handle exclusions and missing values explicitly rather than silently producing invalid numbers. R's PCA documentation identifies the constant-variable restriction. [2]
For held-out prediction, reuse the means and standard deviations estimated from the training data. Recalculating them on each test set changes the transformation and can leak evaluation information.
Check your understanding
Does a scaled value of −1 mean negative concentration?
No. It means one training or analysis-set standard deviation below the corresponding mean, under the declared scaling convention.
Use it in a Guide
References & further reading
- van den Berg et al. (2006). Centering, scaling, and transformations: improving the biological information content of metabolomics data. BMC Genomics 7, 142.
Primary comparison of preprocessing choices on a metabolomics dataset. DOI: 10.1186/1471-2164-7-142. Supports the effect of variable weighting and noise amplification; does not establish one universally preferred scaling method.
- R stats package. prcomp: Principal Components Analysis.
Official documentation for centering, optional unit-variance scaling, singular-value decomposition, score and loading definitions, sample-variance divisor, and arbitrary component signs. The constructed example is calculated independently.