public class KernelDensityEstimator extends Object
Modifier and Type | Field and Description |
---|---|
private double[] |
dens
Result storage: density
|
private double[] |
var
Result storage: variance / quality
|
Constructor and Description |
---|
KernelDensityEstimator(double[] data,
double min,
double max,
KernelDensityFunction kernel,
int windows)
Initialize and execute kernel density estimation.
|
KernelDensityEstimator(double[] data,
KernelDensityFunction kernel)
Process an array of data
|
Modifier and Type | Method and Description |
---|---|
double[] |
getDensity()
Retrieve density array (NO copy)
|
double[] |
getVariance()
Retrieve variance/quality array (NO copy)
|
private void |
process(double[] data,
double min,
double max,
KernelDensityFunction kernel,
int windows)
Process a new array
|
private double[] dens
private double[] var
public KernelDensityEstimator(double[] data, double min, double max, KernelDensityFunction kernel, int windows)
data
- data to usemin
- minimum valuemax
- maximum valuekernel
- Kernel function to usewindows
- window sizepublic KernelDensityEstimator(double[] data, KernelDensityFunction kernel)
data
- data to processkernel
- Kernel function to use.private void process(double[] data, double min, double max, KernelDensityFunction kernel, int windows)
data
- data to usemin
- minimum valuemax
- maximum valuekernel
- Kernel function to usewindows
- window sizepublic double[] getDensity()
public double[] getVariance()