## Interface KernelDensityFunction

• All Known Implementing Classes:
BiweightKernelDensityFunction, CosineKernelDensityFunction, EpanechnikovKernelDensityFunction, GaussianKernelDensityFunction, TriangularKernelDensityFunction, TricubeKernelDensityFunction, TriweightKernelDensityFunction, UniformKernelDensityFunction

public interface KernelDensityFunction
Inner function of a kernel density estimator.

Note: as of now, this API does not support asymmetric kernels, which would be difficult in the multivariate case.

Since:
0.6.0
Author:
Erich Schubert
• ### Method Summary

All Methods
Modifier and Type Method Description
double canonicalBandwidth()
Get the canonical bandwidth for this kernel.
double density​(double delta)
Density contribution of a point at the given relative distance delta >= 0.
double getR()
Get the R integral of the kernel, \int K^2(x) dx
double standardDeviation()
Get the standard deviation of the kernel function.
• ### Method Detail

• #### density

double density​(double delta)
Density contribution of a point at the given relative distance delta >= 0.

Note that for delta < 0, in particular for delta < 1, the results may become invalid. So usually, you will want to invoke this as:

kernel.density(Math.abs(delta))

Parameters:
delta - Relative distance
Returns:
density contribution
• #### canonicalBandwidth

@Reference(authors="J. S. Marron, D. Nolan",
title="Canonical kernels for density estimation",
booktitle="Statistics & Probability Letters, Volume 7, Issue 3",
url="https://doi.org/10.1016/0167-7152(88)90050-8",
bibkey="doi:10.1016/0167-71528890050-8")
double canonicalBandwidth()
Get the canonical bandwidth for this kernel.

Note: R uses a different definition of "canonical bandwidth", and also uses differently scaled kernels.

Returns:
Canonical bandwidth
• #### standardDeviation

double standardDeviation()
Get the standard deviation of the kernel function.
Returns:
Standard deviation
• #### getR

double getR()
Get the R integral of the kernel, \int K^2(x) dx

TODO: any better name for this?

Returns:
R value