SSJ  3.2.1
Stochastic Simulation in Java
Public Member Functions | Static Public Member Functions | List of all members
DEDerivativeGaussian Class Reference

This class implements a density derivative estimator (DDE) with a Gaussian ( i.e., standard normal) kernel function. More...

Inheritance diagram for DEDerivativeGaussian:
[legend]
Collaboration diagram for DEDerivativeGaussian:
[legend]

Public Member Functions

 DEDerivativeGaussian (int order)
 Constructs a DDE with a Gaussian kernel function of order order. More...
 
 DEDerivativeGaussian (int order, double h)
 Constructs a DDE with a Gaussian kernel function of order order and bandwidth h. More...
 
double evalDensity (double x, double[] data, double a, double b)
 
double [] evalDensity (double[] evalPoints, double[] data, double a, double b)
 Constructs a DDE with a Gaussian kernel function from the observations data and the bandwith \(h\) set to getH(). More...
 
String toString ()
 
- Public Member Functions inherited from DensityDerivativeEstimator
int getOrder ()
 Gives the order \(r\) of the DDE. More...
 
void setOrder (int order)
 Sets the order \(r\) of the DDE to order. More...
 
double getH ()
 Gives the current bandwidth \(h\). More...
 
void setH (double h)
 Sets the bandwidth \(h\) to h. More...
 
String toString ()
 
- Public Member Functions inherited from DensityEstimator
abstract double evalDensity (double x, double data[], double a, double b)
 Constructs a density estimator over the interval \([a,b]\) based on the observations data if necessary, and evaluates it at x. More...
 
double [] evalDensity (double[] evalPoints, double[] data, double a, double b)
 Constructs a density estimator over the interval \([a,b]\) based on the observations data if necessary, and evaluates it at the points in evalPoints. More...
 
double [][] evalDensity (double[] evalPoints, double[][] data, double a, double b)
 This method is particularly designed to evaluate the density estimator in such a way that the result can be easily used to estimate the empirical IV and other convergence-related quantities. More...
 
abstract String toString ()
 Gives a short description of the estimator. More...
 

Static Public Member Functions

static double hermitePoly (int r, double x)
 Computes the probabilist's Hermite polynomial of order r at x, which is defined by the recursion

\[H_{r+1}(x)= x H_r(x) - r H_{r-1}(x) \]

with initial values \(H_0(x) = 0\), \(H_1(x) = x\). More...

 
- Static Public Member Functions inherited from DensityDerivativeEstimator
static double hAmiseR (int r, double mu2, double mu2Derivative, double init, int n)
 Given a value init for the roughness functional of \( f^{(r+2)}\), mu2 the second moment of the kernel function \(K\), and mu2Derivative the second moment of \(K^{(r)}\), this method computes the asymptotically optimal bandwidth for the DDE based on \(n\) observations simulated by Monte Carlo for the \(r\)-th derivative of the sought density \(f\). More...
 
static double hAmiseR (int r, int t, double mu2, double[] mu2Derivative, double init, DensityDerivativeEstimator dde, double[] data, double[] evalPoints, double a, double b)
 Given an estimate of \(R(f^{(r+2t)})\) via init as initial value, this function iterates over (hopt) \(t\) times to obtain the asymptotically optimal bandwidth for the DDE based on \(n\) observations simulated by Monte Carlo for the \(r\)-th derivative of the sought density \(f\). More...
 
static double densityFunctionalGaussian (int r, double sigma)
 Computes \(\Phi_{2r}(p)\), i.e. More...
 
- Static Public Member Functions inherited from DensityEstimator
static void evalDensity (ArrayList< DensityEstimator > listDE, double[] evalPoints, double[][] data, double a, double b, ArrayList< double[][]> listDensity)
 This function is particularly designed for experiments with many different types of density estimators, as it evaluates all of these estimators at the points in evalPoints. More...
 
static double [] computeVariance (double[][] density)
 This method computes the empirical variance based on the values given in data. More...
 
static double computeIV (double[][] density, double a, double b, double[] variance)
 This method estimates the empirical IV over the interval \([a,b]\). More...
 
static void computeIV (ArrayList< double[][]> listDensity, double a, double b, ArrayList< Double > listIV)
 This method estimates the empirical IV over the interval \([a,b]\) for a collection of different estimators. More...
 
static double [] computeMISE (ContinuousDistribution dist, double[] evalPoints, double[][] density, double a, double b, double[] variance, double[] sqBias, double[] mse)
 In situations where the true density is known this method can estimate the empirical MISE over the interval \([a,b]\). More...
 
static void computeMISE (ContinuousDistribution dist, double[] evalPoints, ArrayList< double[][]> listDensity, double a, double b, ArrayList< double[]> listMISE)
 This method estimates the empirical MISE over the interval \([a,b]\) for a collection of different estimators. More...
 
static String plotDensity (double[] evalPoints, double[] density, String plotTitle, String[] axisTitles)
 Gives a plot of the estimated density. More...
 
static double roughnessFunctional (double[] density, double a, double b)
 Estimates the roughness functional. More...
 

Additional Inherited Members

- Static Protected Member Functions inherited from DensityEstimator
static double coefficientOfDetermination (double[] data, double[] dataEstimated)
 Computes the Coefficient of determination \(R^2\) of the observed data data and the estimated data dataEstimated. More...
 
- Protected Attributes inherited from DensityEstimator
double [] data
 The data associated with this DensityEstimator object, if any.
 

Detailed Description

This class implements a density derivative estimator (DDE) with a Gaussian ( i.e., standard normal) kernel function.

While many general methods are already handled by its superclass, this class is mainly concerned with the construction and evaluation of this kind of DDE. The formula specific to a Gaussian DDE is given by

\[ \hat{f}^{(r)}_{n,h}(x) = \frac{(-1)^r}{n h^{r+1}}\sum_{i=0}^{n-1} \phi \left( \frac{x-X_i}{h}\right) H_r\left( \frac{x-X_i}{h}\right), \]

where \(H_r\) denotes the probabilist's Hermite polynomial of order \(r\) and \(\phi\) denotes the standard normal density.

Author
puchhamf

Constructor & Destructor Documentation

◆ DEDerivativeGaussian() [1/2]

DEDerivativeGaussian ( int  order)

Constructs a DDE with a Gaussian kernel function of order order.

Parameters
orderthe order of the derivative considered.

◆ DEDerivativeGaussian() [2/2]

DEDerivativeGaussian ( int  order,
double  h 
)

Constructs a DDE with a Gaussian kernel function of order order and bandwidth h.

Parameters
hthe bandwidth.
orderthe order of the derivative considered.

Member Function Documentation

◆ evalDensity() [1/2]

double evalDensity ( double  x,
double []  data,
double  a,
double  b 
)

◆ evalDensity() [2/2]

double [] evalDensity ( double []  evalPoints,
double []  data,
double  a,
double  b 
)

Constructs a DDE with a Gaussian kernel function from the observations data and the bandwith \(h\) set to getH().

Furthermore, the DDE is evaluated at the points in evalPoints and the resulting values are returned in an array.

Parameters
evalPointsthe evaluation points.
datathe observations for constructing the density estimator.
athe left boundary of the interval.
bthe right boundary of the interval
Returns
the density estimator evaluated at the points evalPoints.

◆ hermitePoly()

static double hermitePoly ( int  r,
double  x 
)
static

Computes the probabilist's Hermite polynomial of order r at x, which is defined by the recursion

\[H_{r+1}(x)= x H_r(x) - r H_{r-1}(x) \]

with initial values \(H_0(x) = 0\), \(H_1(x) = x\).

Parameters
rthe order of the Hermite polynomial.
xthe evaluation point.
Returns
the probabilist's Hermite polynomial.
Remarks
Florian: This should probably be located elsewhere.

The documentation for this class was generated from the following file: