10.28 Rescale Data in Rattle
20260901

Different AI models require different characteristics of the data from which the model will be built. For example, when building a clustering using any kind of distance measure, we may need to normalise the data. Otherwise, a variable like income will overwhelm a variable like age, when calculating distances, considering that a distance of 10 ``years’’ may be more significant than a distance of $10,000 in income, yet, 10,000 swamps 10 when they are added together, as would be the case when calculating distances.
In these situations we will want to normalise our data. The types of normalisations (available through the Rescale feature of the Transform tab) we may want to perform include: re-centering and rescaling our data to be around zero (Recenter); rescaling our data to be in the range from 0 to 1 (Scale [0,1]); do a robust rescaling around zero using the median (-Median/MAD); taking the natural or base 10 logarithm of the number (Natural Log or Log 10); coverting the numbers into a rank ordering from 1 upwards (Rank); and rescaling into an interval from 0 upwards (Interval).
The approach Rattle takes to normalising (and to transforming) our
data keeps the original data without modification. Instead, a new
variable is created with a prefix added to the variable’s name that
indicates the kind of transformation. Prefixes are, respectively,
RRC_, R01_, RMD_, RLG_, R10_, RRK_, and RIN.
We can see the effect of the different normalisations in comparing the summary distributions in the second page of the display panel. It is also informative to compare the distributions visually through the Visual feature of the Explore tab where you can popout the plot for each of the new variables to compare side-by-side the impact of the transformations.
If you find this curated material useful then you can consider a donation to support it's ongoing availability and give you access to the PDF version of this book. The material has been scoped up by Generative AI without permission or any kind of recompense so do consider a donation if you can afford it. Unlike Generative AI your access to this materials is freely given. Desktop Survival Guides include Data Science, GNU/Linux, and MLHub. Books available on Amazon include Data Mining with Rattle and Essentials of Data Science. Togaware has a 30 year tradition of making popular open source software which includes sold privacy preserving productivity apps, rattle, wajig, and mlhub. Hosted by Togaware, a pioneer of free and open source software since 1984. Copyright © 1995-2022 Graham.Williams@togaware.com Creative Commons Attribution-ShareAlike 4.0