com.compomics.util.gui
Class XYPlottingDialog.NormalKernelDensityEstimator
java.lang.Object
com.compomics.util.gui.XYPlottingDialog.NormalKernelDensityEstimator
- Enclosing class:
- XYPlottingDialog
public class XYPlottingDialog.NormalKernelDensityEstimator
- extends Object
This class makes use of "SSJ: Stochastic Simulation in Java" library from
iro.umontreal.ca to estimate probability density function of an array of
double. It first generates independent and identically distributed random
variables from the dataset, at which the density needs to be computed and
then generates the vector of density estimates at the corresponding
variables.
The KernelDensityGen class from the same library is used: the class
implements random variate generators for distributions obtained via
kernel density estimation methods from a set of n individual observations
x1,..., xn. The basic idea is to center a copy of the same symmetric
density at each observation and take an equally weighted mixture of the n
copies as an estimator of the density from which the observations come.
The resulting kernel density has the general form: fn(x) =
(1/nh)?i=1nk((x - xi)/h). K is the kernel (here a Gaussian is chosen) and
h is the bandwidth (smoothing factor).
- Author:
- Paola Masuzzo
Methods inherited from class java.lang.Object |
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait |
XYPlottingDialog.NormalKernelDensityEstimator
public XYPlottingDialog.NormalKernelDensityEstimator()
estimateDensityFunction
public ArrayList estimateDensityFunction(Double[] data)
estimateDensityFunction
public ArrayList estimateDensityFunction(double[] data)
excludeNullValues
public double[] excludeNullValues(Double[] data)
- Exclude null values from an array of Double.
- Parameters:
data
-
- Returns:
- another double array with no longer null values
Copyright © 2013. All Rights Reserved.