# Module dstats.kerneldensity

This module contains a small but growing library for performing kernel density estimation.

## Author

David Simcha

## Functions

Name | Description |
---|---|

`scottBandwidth(data)` | Uses Scott's Rule to select the bandwidth of the Gaussian kernel density estimator. This is 1.06 * min(stdev(data), interquartileRange(data) / 1.34) N ^^ -0.2. R must be a forward range of numeric types. |

## Classes

Name | Description |
---|---|

`KernelDensity` | Construct an N-dimensional kernel density estimator. This is done using the textbook definition of kernel density estimation, since the binning and convolving method used in the 1-D case would rapidly become unfeasible w.r.t. memory usage as dimensionality increased. |

`KernelDensity1D` | Estimates densities in the 1-dimensional case. The 1-D case is special enough to be treated as a special case, since it's very common and enables some significant optimizations that are otherwise not feasible. |