hibou.utils.centered_reduced_normalization#

hibou.utils.centered_reduced_normalization(data: array, mean: float | Iterable[float] = None, std: float | Iterable[float] = None)#

Normalizes the given data column by column by substracting the mean and dividing by the standard deviation:

\[Z = \frac{X - \mu}{\sigma}\]

Parameters#

datanp.array

The NumPy array to normalize.

meanfloat | Iterable[float], optionnal

By default, the function will take the mean of the given data. You can force a value for all the column or pass an Iterable to have one mean per column.

stdfloat | Iterable[float]

By default, the function will take the standard deviation of the given data. You can force a value for all the column or pass an Iterable to have one standard deviation per column.

Returns#

np.array

The normalized data.