statsmodels.robust.scale.mad

statsmodels.robust.scale.mad(a, c=np.float64(0.6744897501960817), axis=0, center=<function median>)[source]

The Median Absolute Deviation along given axis of an array

Parameters:
aarray_like

Input array.

cfloat, optional

The normalization constant. Defined as scipy.stats.norm.ppf(3/4.), which is approximately 0.6745.

axisint, optional

The default is 0. Can also be None.

centercallable or float

If a callable is provided, such as the default np.median then it is expected to be called center(a). The axis argument will be applied via np.apply_over_axes. Otherwise, provide a float.

Returns:
madfloat

mad = median(abs(a - center))/c


Last update: Dec 23, 2024