def robust_std(l, alpha=1/scipy.stats.norm.ppf(0.75)):
"""
Compute a robust estimate of the standard deviation for the list
of values *l* (by default, for normally distributed samples ---
see https://en.wikipedia.org/wiki/Median_absolute_deviation).
"""
return alpha * mad(l)[0]
评论列表
文章目录