statsmodels.nonparametric.bandwidths.bw_scott

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

Scott’s Rule of Thumb

Parameters:
xarray_like

Array for which to get the bandwidth

kernelCustomKernel object

Unused

Returns:
bwfloat

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.


Last update: Mar 18, 2024