AI Grounds

Open AI Grounds on a desktop

These interactive lessons need a larger screen. Please continue on a desktop or laptop computer.

Guided discovery

Feature Scaling Lab

Change units; compare column transformations.

Your dataset

Four reference cases, two feature columns. Scaling uses these four rows’ statistics. A positive unit multiplier changes only feature B’s numerical units, not case identity, ordering or information. Min–max is per-feature normalization here; it is not per-row unit-length normalization.

Scaling method

Each feature uses one column recipe across all four cases. Output = (raw value − reference center)/used denominator; Raw uses center 0 and denominator 1.
CaseRaw ARaw BOutput AOutput B
P111001.000000100.000000
P221502.000000150.000000
P333503.000000350.000000
P444004.000000400.000000

Raw · B multiplier 1 · P1/P4 squared distance 90009.000000

Multiply every raw B value equally. The reference minimum, maximum, mean and SD change into those units. Min–max and z-score recompute their column recipes; a positive unit factor cancels. Use arrow keys on the slider. Press Enter or leave the number field to apply an exact edit.

Squared differences between P1 and P4

Distance² = (Output A4 − Output A1)² + (Output B4 − Output B1)². This treats feature numbers with equal numerical weight; it is not a physical mixed-unit distance or learned feature importance.

Feature A term = (4.000000 − 1.000000)² = 9.000000 · share 0.009999%

Feature B term = (400.000000 − 100.000000)² = 90000.000000 · share 99.990001%

0%50%100%ABShare of current squared distance

Bars use a common share scale. Tiny and zero terms are not inflated. A different pair or scaling recipe can give different shares; these bars do not identify generally important features.

Output A mean

Average across the four transformed A values.

2.500

Population SD = 1.118034

Mean/SD depend on the chosen column recipe.

Output B mean

Average across the four transformed B values.

250.000

Population SD = 127.475488

SD uses divisor 4, the reference case count.

P1/P4 distance²

Sum of the two squared transformed feature differences.

90009.000

9.000000 + 90000.000000

Numerical distance, not an accuracy or importance score.

Reference statistics and recipes
Statistics use all four reference rows in the displayed units. Population SD = sqrt(sum((value − mean)²)/4). Zero range/SD uses denominator 1 after centering; it is not a unit-variance claim.
FeatureMinimumMaximumRangeMeanPopulation SDUsed centerUsed denominator
A1.0000004.0000003.0000002.5000001.1180340.0000001.000000
B100.000000400.000000300.000000250.000000127.4754880.0000001.000000
Construction and limits

Different units uses A [1,2,3,4]; Outlier uses A [1,2,3,20]; Constant feature uses A [2,2,2,2]. Base B is [100,150,350,400], multiplied uniformly by Feature B unit multiplier 1..10. Case identities stay P1..P4. Scenarios preserve method and multiplier; prediction changes and Reset restore the current experiment’s baseline. Parameter, scenario and method edits clear stale explanations.

Raw uses output = x. Min–max uses (x − reference minimum)/(reference maximum − minimum). Z-score uses (x − reference mean)/reference population SD, with variance divisor 4. The reference rows are the fitting set here; a future preprocessing pipeline must fit on appropriate training data and reuse its recipe for held-out inputs. No editable unseen inputs or train/test evaluation is implemented.

For zero range/SD, the used denominator is 1 after subtracting the center. Observed constant values map to zero, retaining zero output SD. Otherwise min–max bounds apply to these reference rows; values outside a fitted range need not stay in 0..1. Z-scores can be negative or exceed 1. Neither recipe removes outliers, makes data normal, equalizes distribution shapes or every pairwise contribution, adds information, or guarantees better model performance. “Normalization” here refers only to column min–max, not row unit norms.

All numeric evidence is computed at full precision; displayed values are rounded. Only P1/P4 is compared in the contribution bars, on a common percentage scale. Summing differently measured raw feature numbers is a demonstration of numerical weighting, not a physical units statement. No model training, learned feature importance, robust/quantile transforms, arbitrary point/probe editing or automatic scaling-policy selection is implemented.

scikit-learn · Standardization and constant features
scikit-learn · Min–max reference ranges
scikit-learn · Scaling and outliers