com.compomics.util.gui
Class XYPlottingDialog.NormalKernelDensityEstimator

java.lang.Object
  extended by com.compomics.util.gui.XYPlottingDialog.NormalKernelDensityEstimator
Enclosing class:
XYPlottingDialog

public class XYPlottingDialog.NormalKernelDensityEstimator
extends java.lang.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

Constructor Summary
XYPlottingDialog.NormalKernelDensityEstimator()
           
 
Method Summary
 java.util.ArrayList estimateDensityFunction(double[] data)
           
 java.util.ArrayList estimateDensityFunction(java.lang.Double[] data)
           
 double[] excludeNullValues(java.lang.Double[] data)
          Exclude null values from an array of Double.
 
Methods inherited from class java.lang.Object
clone, equals, finalize, getClass, hashCode, notify, notifyAll, toString, wait, wait, wait
 

Constructor Detail

XYPlottingDialog.NormalKernelDensityEstimator

public XYPlottingDialog.NormalKernelDensityEstimator()
Method Detail

estimateDensityFunction

public java.util.ArrayList estimateDensityFunction(java.lang.Double[] data)

estimateDensityFunction

public java.util.ArrayList estimateDensityFunction(double[] data)

excludeNullValues

public double[] excludeNullValues(java.lang.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.