|
Statistics.KernelDensity | Portability | portable | Stability | experimental | Maintainer | bos@serpentine.com |
|
|
|
|
|
Description |
Kernel density estimation code, providing non-parametric ways to
estimate the probability density function of a sample.
|
|
Synopsis |
|
|
|
|
Simple entry points
|
|
|
:: Vector v Double | | => Int | Number of points at which to estimate
| -> v Double | Data sample
| -> (Points, Vector Double) | | Simple Epanechnikov kernel density estimator. Returns the
uniformly spaced points from the sample range at which the density
function was estimated, and the estimates at those points.
|
|
|
|
:: Vector v Double | | => Int | Number of points at which to estimate
| -> v Double | Data sample
| -> (Points, Vector Double) | | Simple Gaussian kernel density estimator. Returns the uniformly
spaced points from the sample range at which the density function
was estimated, and the estimates at those points.
|
|
|
Building blocks
|
|
Choosing points from a sample
|
|
|
Points from the range of a Sample.
| Constructors | | Instances | |
|
|
|
:: Vector v Double | | => Int | Number of points to select, n
| -> Double | Sample bandwidth, h
| -> v Double | Input data
| -> Points | | Choose a uniform range of points at which to estimate a sample's
probability density function.
If you are using a Gaussian kernel, multiply the sample's bandwidth
by 3 before passing it to this function.
If this function is passed an empty vector, it returns values of
positive and negative infinity.
|
|
|
Bandwidth estimation
|
|
|
The width of the convolution kernel used.
|
|
|
Compute the optimal bandwidth from the observed data for the given
kernel.
|
|
|
Bandwidth estimator for an Epanechnikov kernel.
|
|
|
Bandwidth estimator for a Gaussian kernel.
|
|
Kernels
|
|
|
The convolution kernel. Its parameters are as follows:
- Scaling factor, 1/nh
- Bandwidth, h
- A point at which to sample the input, p
- One sample value, v
|
|
|
Epanechnikov kernel for probability density function estimation.
|
|
|
Gaussian kernel for probability density function estimation.
|
|
Low-level estimation
|
|
|
|
|
|
:: Vector v Double | | => Double -> Double | Bandwidth function
| -> Kernel | Kernel function
| -> Double | Bandwidth scaling factor (3 for a Gaussian kernel, 1 for all others)
| -> Int | Number of points at which to estimate
| -> v Double | sample data
| -> (Points, Vector Double) | | A helper for creating a simple kernel density estimation function
with automatically chosen bandwidth and estimation points.
|
|
|
Produced by Haddock version 2.4.2 |