HORIZON HASKELLDocslts/ghc-9.10.x248f8f02026-10-05Search names, modules, packages, or :: a typeCtrl K

GHC 9.10.3 · lts/ghc-9.10.x · 248f8f0 · 2026-10-05

Modulestatistics-0.16.3.0Haskell2010

Statistics.Sample.KernelDensity

Kernel density estimation. This module provides a fast, robust, non-parametric way to estimate the probability density function of a sample.

This estimator does not use the commonly employed "Gaussian rule of thumb". As a result, it outperforms many plug-in methods on multimodal samples with widely separated modes.

  • 2 values

Estimation functions

2 declarations
valuekde
  1. :: (Vector v CD, Vector v Double, Vector v Int)
  2. => Int

    The number of mesh points to use in the uniform discretization of the interval (min,max). If this value is not a power of two, then it is rounded up to the next power of two.

  3. -> v Double
  4. -> (v Double, v Double)
#

Gaussian kernel density estimator for one-dimensional data, using the method of Botev et al.

The result is a pair of vectors, containing:

  • The coordinates of each mesh point. The mesh interval is chosen to be 20% larger than the range of the sample. (To specify the mesh interval, use kde_.)

  • Density estimates at each mesh point.

valuekde_
  1. :: (Vector v CD, Vector v Double, Vector v Int)
  2. => Int

    The number of mesh points to use in the uniform discretization of the interval (min,max). If this value is not a power of two, then it is rounded up to the next power of two.

  3. -> Double

    Lower bound (min) of the mesh range.

  4. -> Double

    Upper bound (max) of the mesh range.

  5. -> v Double
  6. -> (v Double, v Double)
#

Gaussian kernel density estimator for one-dimensional data, using the method of Botev et al.

The result is a pair of vectors, containing:

  • The coordinates of each mesh point.

  • Density estimates at each mesh point.

References

0 declarations

Botev. Z.I., Grotowski J.F., Kroese D.P. (2010). Kernel density estimation via diffusion. Annals of Statistics 38(5):2916–2957. http://arxiv.org/pdf/1011.2602