public class MultivariateKernelDensityEstimate extends AbstractMultivariateDistribution
| Constructor and Description |
|---|
MultivariateKernelDensityEstimate(double[][] data,
UnivariateKernel kernel,
double bandwidth)
Construct with the given data, kernel and bandwidth
|
MultivariateKernelDensityEstimate(List<double[]> data,
UnivariateKernel kernel,
double bandwidth)
Construct with the given data, kernel and bandwidth
|
| Modifier and Type | Method and Description |
|---|---|
double[] |
estimateLogProbability(double[][] x)
Get the log probability for a given point in space relative to the PDF
represented by this distribution.
|
double |
estimateProbability(double[] sample)
Get the probability for a given point in space relative to the PDF
represented by this distribution.
|
double |
getBandwidth()
Get the bandwidth
|
double[][] |
getData()
Get the underlying data
|
double |
getScaledBandwidth()
Get the bandwidth scaled by the kernel support.
|
List<ObjectDoublePair<double[]>> |
getSupport(double[] sample)
Get the underlying points that support the KDE within the window around
the given point.
|
double[] |
sample(Random rng)
Sample the distribution.
|
estimateLogProbability, samplepublic MultivariateKernelDensityEstimate(double[][] data, UnivariateKernel kernel, double bandwidth)
data - the datakernel - the kernelbandwidth - the bandwidthpublic MultivariateKernelDensityEstimate(List<double[]> data, UnivariateKernel kernel, double bandwidth)
data - the datakernel - the kernelbandwidth - the bandwidthpublic double[] sample(Random rng)
MultivariateDistributionrng - the random number generatorpublic double estimateProbability(double[] sample)
MultivariateDistributionsample - the pointpublic List<ObjectDoublePair<double[]>> getSupport(double[] sample)
sample - the point in the centre of the windowpublic double[][] getData()
public double getBandwidth()
public double getScaledBandwidth()
UnivariateKernel.getCutOff()public double[] estimateLogProbability(double[][] x)
MultivariateDistributionx - the samples