SSJ API Documentation
Stochastic Simulation in Java
Loading...
Searching...
No Matches
umontreal.ssj.stat.density.ConditionalDensityEstimator Class Referenceabstract

This is an abstract class that implements an DensityEstimatorDoubleArray. More...

Inheritance diagram for umontreal.ssj.stat.density.ConditionalDensityEstimator:
umontreal.ssj.stat.density.DensityEstimatorDoubleArray

Public Member Functions

void setData (double[][] data)
 Sets the observations for the density estimator to data.
double evalDensity (double x)
 Evaluates the density estimator at x.
double[] evalDensity (double[] x)
 Evaluates the density estimator at the points in evalPoints.
double[] evalDensity (double[] evalPoints, double[][] data)
 Sets the observations for the density estimator to data and evaluates the density at each point in evalPoints.
abstract double evalEstimator (double x, double[] data)
 Evaluates the function \(g\) at the point x and the realization of \(\mathbf{X}\) given in the \(t\)-dimensional array data.
String toString ()
 Gives a short description of the estimator.
Public Member Functions inherited from umontreal.ssj.stat.density.DensityEstimatorDoubleArray
double[][] getData ()
 Gives the observations for this density estimator, if any.
double[][] evalDensity (double[] evalPoints, double[][][] data)
 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.

Additional Inherited Members

Static Public Member Functions inherited from umontreal.ssj.stat.density.DensityEstimatorDoubleArray
static void evalDensity (ArrayList< DensityEstimatorDoubleArray > listDE, double[] evalPoints, double[][][] data, 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.
Protected Attributes inherited from umontreal.ssj.stat.density.DensityEstimatorDoubleArray
double[][] data
 The data associated with this DensityEstimatorDoubleArray object, if any.

Detailed Description

This is an abstract class that implements an DensityEstimatorDoubleArray.

It is designed for situations, where the estimator \(\hat{f}\) can be written in the form

\[ \hat{f}(x) = \frac{1}{n}\sum_{i=0}^{n-1}g(x;\mathbf{X}_i), \]

where \(\mathbf{X}_i\) is a realization of a \(t\)-dimensional random variable \(\mathbf{X}_i\) and where \(g\) is a real function. This is the case for a conditional density estimator, or a likelihood-ratio estimator, for instance.

Remarks
Florian: Maybe the name is misleading, because this estimator applies in many different settings.
TODO: Add citations when papers for these estimators are published.

The evaluation of \(g(x;\mathbf{X})\) at \(x\) given \(\mathbf{X}\) is handled by the abstract function evalEstimator.

Author
florian

Definition at line 28 of file ConditionalDensityEstimator.java.

Member Function Documentation

◆ evalDensity() [1/3]

double umontreal.ssj.stat.density.ConditionalDensityEstimator.evalDensity ( double x)

Evaluates the density estimator at x.

Parameters
xthe evaluation point.
Returns
the density estimator evaluated at \(x\).

Reimplemented from umontreal.ssj.stat.density.DensityEstimatorDoubleArray.

Definition at line 42 of file ConditionalDensityEstimator.java.

◆ evalDensity() [2/3]

double[] umontreal.ssj.stat.density.ConditionalDensityEstimator.evalDensity ( double[] evalPoints,
double data[][] )

Sets the observations for the density estimator to data and evaluates the density at each point in evalPoints.

Parameters
evalPointsthe evaluation points.
datathe observations.
Returns
the density estimator defined by data evaluated at each point in evalPoints.

Reimplemented from umontreal.ssj.stat.density.DensityEstimatorDoubleArray.

Definition at line 71 of file ConditionalDensityEstimator.java.

◆ evalDensity() [3/3]

double[] umontreal.ssj.stat.density.ConditionalDensityEstimator.evalDensity ( double[] evalPoints)

Evaluates the density estimator at the points in evalPoints.

By default, this method calls evalDensity(double) for each entry of evalPoints. Many density estimators can handle evaluation at a set of points more efficiently than that. If so, it is suggested to override this method in the implementation of the corresponding estimator.

Returns
the density estimator evaluated at the points evalPoints.

Reimplemented from umontreal.ssj.stat.density.DensityEstimatorDoubleArray.

Definition at line 54 of file ConditionalDensityEstimator.java.

◆ evalEstimator()

abstract double umontreal.ssj.stat.density.ConditionalDensityEstimator.evalEstimator ( double x,
double[] data )
abstract

Evaluates the function \(g\) at the point x and the realization of \(\mathbf{X}\) given in the \(t\)-dimensional array data.

Parameters
xthe evaluation point.
datathe realization of \(\mathbf{X}\).
Returns
the function \(g(x,\mathbf{X})\).

◆ setData()

void umontreal.ssj.stat.density.ConditionalDensityEstimator.setData ( double data[][])

Sets the observations for the density estimator to data.

Note that, in some cases, this might require to completely reconstruct the density estimator.

Parameters
datathe desired observations.

Reimplemented from umontreal.ssj.stat.density.DensityEstimatorDoubleArray.

Definition at line 31 of file ConditionalDensityEstimator.java.

◆ toString()

String umontreal.ssj.stat.density.ConditionalDensityEstimator.toString ( )

Gives a short description of the estimator.

Returns
a short description.

Reimplemented from umontreal.ssj.stat.density.DensityEstimatorDoubleArray.

Definition at line 87 of file ConditionalDensityEstimator.java.


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