Skip to main content

stats.normalize

stats.normalize(d, clip=(0.0005, 0.9995), keep_stats=True)

Normalize the data to normal distribution.

Parameters

Name Type Description Default
d ndarray The data to be normalized. The function assumes that d is 1D. required
clip float or tuple of float The lower and upper bounds for clipping the percentiles. By default, the function clips percentiles above 99.95% and below 0.05%. If a float is provided, it is used as the percentage of clipping, e.g., 0.01 for clipping percentiles above 99.5% and below 0.5%. (0.0005, 0.9995)
keep_stats bool Whether to keep the mean and standard deviation of the input data. If False, the returned data is normalized to standard normal distribution (zero mean and unit variance). True

Returns

Name Type Description
d_new ndarray The normalized data.