Normalize
Rescale functions normalize
syntax
- normalize(a, mean, sd)
definition
normalize(a, mean, sd) scales the Attribute a to a normal distribution with as mean value the literal or Parameter mean and as standard deviation the literal or parameter sd.
The resulting attribute has a new Values unit and the same Domain unit as attribute a.
description
The literals or parameters mean and sd have default values of zero and one.
To avoid rounding off errors in the normalize calculations, use a float32 or float64 Value type for the a, mean and sd arguments.
conditions
The value type of attribute a and literals or parameters mean and sd must match.
example
attribute<float32> normalize_NrInh (City) := normalize(City/NrInhabitants, 0f, 1f);
| City/NrInhabitants | normalize_NrInh |
|---|---|
| 550 | 1.13 |
| 525 | 0.96 |
| 300 | -0.48 |
| 500 | 0.80 |
| 200 | -1.13 |
| 175 | -1.29 |
| null | null |
domain City, nr of rows = 7