This function transform the input data via z-standardisation. See the Details section below for further information.
Details
The z-standardisation (or z-score normalisation) is a method for transforming the data so that it has a mean of zero and a standard deviation of one. It is computed as:
$$z(x) = \frac{x - \mu}{\sigma}$$
where \(\mu\) and \(\sigma\) are the mean and standard deviation of the population, respectively.
Since z-scores can be affected by unusually large or small data values, we can also compute a more robust modified version as:
$$z(x) = \frac{x - \mathrm{median}}{\mathrm{MAD}}$$
where \(\mathrm{MAD}\) is the median absolute deviation of the population.