Package elki.math.statistics
Class KernelDensityEstimator
- java.lang.Object
-
- elki.math.statistics.KernelDensityEstimator
-
public class KernelDensityEstimator extends java.lang.Object
Estimate density given an array of points.Estimates a density using a variable width kernel density estimation.
- Since:
- 0.2
- Author:
- Erich Schubert
-
-
Constructor Summary
Constructors Constructor Description KernelDensityEstimator(double[] data, double min, double max, KernelDensityFunction kernel, int window, double epsilon)
Initialize and execute kernel density estimation.KernelDensityEstimator(double[] data, KernelDensityFunction kernel, double epsilon)
Process an array of data
-
Method Summary
All Methods Instance Methods Concrete Methods Modifier and Type Method 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 window, double epsilon)
Process a new array
-
-
-
Constructor Detail
-
KernelDensityEstimator
public KernelDensityEstimator(double[] data, double min, double max, KernelDensityFunction kernel, int window, double epsilon)
Initialize and execute kernel density estimation.- Parameters:
data
- data to use (must be sorted!)min
- minimum valuemax
- maximum valuekernel
- Kernel function to usewindow
- window sizeepsilon
- Precision threshold
-
KernelDensityEstimator
public KernelDensityEstimator(double[] data, KernelDensityFunction kernel, double epsilon)
Process an array of data- Parameters:
data
- data to process (must be sorted!)kernel
- Kernel function to use.epsilon
- Precision threshold
-
-
Method Detail
-
process
private void process(double[] data, double min, double max, KernelDensityFunction kernel, int window, double epsilon)
Process a new array- Parameters:
data
- data to use (must be sorted!)min
- minimum valuemax
- maximum valuekernel
- Kernel function to usewindow
- window sizeepsilon
- Precision threshold
-
getDensity
public double[] getDensity()
Retrieve density array (NO copy)- Returns:
- density array
-
getVariance
public double[] getVariance()
Retrieve variance/quality array (NO copy)- Returns:
- variance array
-
-