hibou.utils.min_max_normalization#
- hibou.utils.min_max_normalization(data: array, minimum: float | Iterable[float] = None, maximum: float | Iterable[float] = None)#
Normalizes the given data column by column by substracting the min and dividing by the difference between the max and min:
\[Z = \frac{X - \textrm{min}_X}{\textrm{max}_X - \textrm{min}_X}\]Parameters#
- data
np.array The NumPy array to normalize.
- minimum
float | Iterable[float], optionnal By default, the function will take the minimum of the given
data. You can force a value for all the column or pass an Iterable to have one mean per column.- maximum
float | Iterable[float], optionnal By default, the function will take the maximum of the given
data. You can force a value for all the column or pass an Iterable to have one maximum per column.
Returns#
np.arrayThe normalized data.
- data