nonparametric.bandwidths.bw_scott()

statsmodels.nonparametric.bandwidths.bw_scott

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

Scott’s Rule of Thumb

Parameters:

x : array-like

Array for which to get the bandwidth

kernel : CustomKernel object

Unused

Returns:

bw : float

The estimate of the bandwidth

Notes

Returns 1.059 * A * n ** (-1/5.) where

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

References

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

© 2009–2012 Statsmodels Developers
© 2006–2008 Scipy Developers
© 2006 Jonathan E. Taylor
Licensed under the 3-clause BSD License.
http://www.statsmodels.org/stable/generated/statsmodels.nonparametric.bandwidths.bw_scott.html

在线笔记
App下载
App下载

扫描二维码

下载编程狮App

公众号
微信公众号

编程狮公众号

意见反馈
返回顶部