Data Normalization Workbench

Edit a small temperature dataset, switch between Min-Max, Z-score, and Robust-IQR scaling, and watch how one stuck-sensor outlier collapses Min-Max while Robust holds.

animation
data-analytics
normalization
feature-scaling
robust-scaling
outliers
interactive
An interactive data normalization workbench: an editable temperature dataset, Min-Max / Z-score / Robust-IQR method selector, live raw-vs-scaled dot strips, computed parameters with formulas, and an outlier-injection control that quantifies how Min-Max collapses while Robust holds. Defaults reproduce the chapter’s worked audit exactly.
Data Analytics Feature Scaling ~12 min

Data Normalization Workbench

Edit a small temperature dataset, pick a scaling method, and watch the raw readings become scaled values. Then inject a stuck-sensor outlier and see Min-Max collapse while Robust-IQR holds. The default dataset reproduces the chapter's worked audit exactly.

Active method
Min-Max
Output range 0 to 1
Scale it depends on
Range = 7
max minus min
Readings
5 values
no outlier injected

Controls

5 values loaded.

Type comma or space separated numbers. The default is the chapter's five-reading example.

Scaling method
Outlier injection

Watch the "Scale it depends on" metric and the outlier-impact panel change the instant the spike lands.

Presets

Raw readings versus scaled output

Min-Max
Raw readings (°C)
After Min-Max scaling
Clean reading Injected outlier Clean band = spread of the clean readings after scaling

Min-Max

x' = (x − min) / (max − min)
min
18
max
25
range
7

Z-score

z = (x − μ) / σ
mean μ
21
σ (pop.)
2.449490
variance
6

Robust-IQR

x' = (x − median) / IQR
median
21
Q1 / Q3
19 / 22
IQR
3
Reading Min-Max Z-score Robust

Outlier impact

Inject the outlier (or load the "One outlier" preset) to compare how each method's scale reacts.

Min-Max range (denominator)
7
Robust IQR (denominator)
3
22°C under Min-Max
0.571429
22°C under Robust
0.333333
Min-Max

Bounded, but fragile

Rescales to 0 to 1 using min and max. Great for neural networks that expect bounded inputs, but one extreme reading hijacks the range and crushes every clean value into a sliver.

Z-score

Distance-preserving

Centers on the mean and divides by the standard deviation. Good for clustering, SVM, and PCA that assume roughly Gaussian data, but the mean and σ are still pulled by outliers.

Robust-IQR

Outlier resistant

Centers on the median and divides by the interquartile range. Median and IQR barely move when a single sensor sticks, so reach for it whenever spikes are expected in IoT telemetry.

Standard deviation uses the population form (divide by n), matching the chapter's worked example (variance 30/5 = 6, σ = √6 ≈ 2.449490). Quartiles use linear interpolation (the NumPy default), so median = 21, Q1 = 19, Q3 = 22, IQR = 3 for the clean dataset.