statsmodels.nonparametric.bandwidths.bw_scott

statsmodels.nonparametric.bandwidths.bw_scott(x, kernel=None)[source]

斯科特的经验法则

Parameters:
xarray_like

要获取带宽的数组

kernelCustomKernel object

未使用

Returns:
bwfloat

带宽的估计

注释

返回 1.059 * A * n ** (-1/5.) 其中

A = min(std(x, ddof=1), IQR/1.349)
IQR = np.subtract.reduce(np.percentile(x, [75,25]))

参考文献

Scott, D.W. (1992) Multivariate Density Estimation: Theory, Practice, and

可视化。


Last update: Oct 16, 2024