-
Notifications
You must be signed in to change notification settings - Fork 1
Rescale
Rescale functions rescale
- rescale(a, min, max)
rescale(a, min, max) scales the attribute a between the literal/parameter minvalue and the literal/parametermax value.
The relative differences between the values in the new distribution are similar to the original distribution.
The resulting attribute has a new values unit and the same domain unit as attribute a.
To avoid rounding off errors in the rescale calculation, use a float32 of float64 value type for the a, min and max arguments.
Be cautious in using rescales. The values unit/metric of the original attribute get's lost, less checks can be applied and the results become more difficult to interpret.
The value type of attribute a and literal/parameter min and max must match.
attribute
rescale_NrInh (City) :=
rescale
(City/NrInhabitants, 0f, 1f);
City/NrInhabitants | rescale_nrInh | |
550 | 1 | |
525 | 0.93 | |
300 | 0.33 | |
500 | 0.87 | |
200 | 0.07 | |
175 | 0 | |
null | null |
domain City, nr of rows = 7
GeoDMS ©Object Vision BV. Source code distributed under GNU GPL-3. Documentation distributed under CC BY-SA 4.0.