DATA MINING
Desktop Survival Guide by Graham Williams |
|||||
Recenter |
A common normalisation is to recenter and rescale our data. The simplest approach to do this is to subtract the mean value of a variable from each observation's value of the variable (to recenter the variable) and to then divide the values by the root-mean-square of the variable values ( ), which re-scales the variable back to a range within a few integer values around zero.
Rattle relies on the scale function from the base package to perform the re-centering:
> weather$RRC_Evaporation <- scale(weather$Evaporation)[,1] > summary(weather$RRC_Evapration) |
Length Class Mode 0 NULL NULL |
Note that the resulting mean is not precisely zero, but pretty close.