gov.sandia.cognition.statistics.distribution
Class UnivariateGaussian.CDF

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<NumberType>
          extended by gov.sandia.cognition.statistics.AbstractClosedFormUnivariateDistribution<Double>
              extended by gov.sandia.cognition.statistics.AbstractClosedFormSmoothUnivariateDistribution
                  extended by gov.sandia.cognition.statistics.distribution.UnivariateGaussian
                      extended by gov.sandia.cognition.statistics.distribution.UnivariateGaussian.CDF
All Implemented Interfaces:
Evaluator<Double,Double>, ClosedFormDifferentiableEvaluator<Double,Double,Double>, DifferentiableEvaluator<Double,Double,Double>, Vectorizable, ScalarFunction<Double>, UnivariateScalarFunction, ClosedFormComputableDistribution<Double>, ClosedFormCumulativeDistributionFunction<Double>, ClosedFormDistribution<Double>, ClosedFormUnivariateDistribution<Double>, ComputableDistribution<Double>, CumulativeDistributionFunction<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,UnivariateGaussian>, InvertibleCumulativeDistributionFunction<Double>, SmoothCumulativeDistributionFunction, SmoothUnivariateDistribution, UnivariateDistribution<Double>, CloneableSerializable, Serializable, Cloneable
Enclosing class:
UnivariateGaussian

public static class UnivariateGaussian.CDF
extends UnivariateGaussian
implements SmoothCumulativeDistributionFunction, InvertibleCumulativeDistributionFunction<Double>

CDF of the underlying Gaussian.

See Also:
Serialized Form

Nested Class Summary
static class UnivariateGaussian.CDF.Inverse
          Inverts the CumulativeDistribution function.
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
UnivariateGaussian.CDF, UnivariateGaussian.ErrorFunction, UnivariateGaussian.IncrementalEstimator, UnivariateGaussian.MaximumLikelihoodEstimator, UnivariateGaussian.PDF, UnivariateGaussian.SufficientStatistic, UnivariateGaussian.WeightedMaximumLikelihoodEstimator
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
BIG_Z, DEFAULT_MEAN, DEFAULT_VARIANCE, mean, PI2, SQRT2, variance
 
Constructor Summary
UnivariateGaussian.CDF()
          Creates a new instance of UnivariateGaussian with zero mean and unit variance
UnivariateGaussian.CDF(double mean, double variance)
          Creates a new instance of UnivariateGaussian
UnivariateGaussian.CDF(UnivariateGaussian other)
          Copy constructor
 
Method Summary
 Double differentiate(Double input)
          Differentiates the output with respect to the input
 double evaluate(double z)
          Produces a double output for the given double input
 Double evaluate(Double input)
          Evaluates the function on the given input and returns the output.
static double evaluate(double z, double mean, double variance)
          Computes the cumulative distribution of a Normalized Gaussian distribution using the errorFunction method.
 double evaluateAsDouble(Double input)
          Evaluates the scalar function as a double.
 UnivariateGaussian.CDF getCDF()
          Gets the CDF of a scalar distribution.
 UnivariateGaussian.PDF getDerivative()
          Gets the closed-form derivative of the function.
 Double inverse(double probability)
          Computes the inverse of the CDF for the given probability.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
clone, convertFromVector, convertToVector, convolve, getEstimator, getMaxSupport, getMean, getMinSupport, getProbabilityFunction, getVariance, sample, setMean, setVariance, times, toString
 
Methods inherited from class gov.sandia.cognition.statistics.AbstractDistribution
sample
 
Methods inherited from class java.lang.Object
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
 
Methods inherited from interface gov.sandia.cognition.statistics.SmoothUnivariateDistribution
getMean, getProbabilityFunction
 
Methods inherited from interface gov.sandia.cognition.statistics.UnivariateDistribution
getMaxSupport, getMinSupport, getVariance
 
Methods inherited from interface gov.sandia.cognition.statistics.Distribution
sample, sample
 
Methods inherited from interface gov.sandia.cognition.math.matrix.Vectorizable
clone, convertFromVector, convertToVector
 

Constructor Detail

UnivariateGaussian.CDF

public UnivariateGaussian.CDF()
Creates a new instance of UnivariateGaussian with zero mean and unit variance


UnivariateGaussian.CDF

public UnivariateGaussian.CDF(double mean,
                              double variance)
Creates a new instance of UnivariateGaussian

Parameters:
mean - First central moment (expectation) of the distribution
variance - Second central moment (square of standard deviation) of the distribution

UnivariateGaussian.CDF

public UnivariateGaussian.CDF(UnivariateGaussian other)
Copy constructor

Parameters:
other - UnivariateGaussian to copy
Method Detail

evaluate

public Double evaluate(Double input)
Description copied from interface: Evaluator
Evaluates the function on the given input and returns the output.

Specified by:
evaluate in interface Evaluator<Double,Double>
Parameters:
input - The input to evaluate.
Returns:
The output produced by evaluating the input.

evaluateAsDouble

public double evaluateAsDouble(Double input)
Description copied from interface: ScalarFunction
Evaluates the scalar function as a double.

Specified by:
evaluateAsDouble in interface ScalarFunction<Double>
Parameters:
input - The input value.
Returns:
The scalar output calculated from the given input.

evaluate

public double evaluate(double z)
Description copied from interface: UnivariateScalarFunction
Produces a double output for the given double input

Specified by:
evaluate in interface UnivariateScalarFunction
Parameters:
z - Input to the Evaluator
Returns:
output at the given input

evaluate

public static double evaluate(double z,
                              double mean,
                              double variance)
Computes the cumulative distribution of a Normalized Gaussian distribution using the errorFunction method. cdf(0) = 0.5, cdf(-infinity) = 0, cdf(infinity) = 1

Parameters:
mean - Mean of the PDF
variance - Variance of the PDF
z - value to compute the Gaussian cdf at
Returns:
integral( -infinity, z, gaussian(0,1) ) will be [0,1]

getCDF

public UnivariateGaussian.CDF getCDF()
Description copied from interface: UnivariateDistribution
Gets the CDF of a scalar distribution.

Specified by:
getCDF in interface ClosedFormUnivariateDistribution<Double>
Specified by:
getCDF in interface SmoothUnivariateDistribution
Specified by:
getCDF in interface UnivariateDistribution<Double>
Overrides:
getCDF in class UnivariateGaussian
Returns:
CDF of the scalar distribution.

getDerivative

public UnivariateGaussian.PDF getDerivative()
Description copied from interface: ClosedFormDifferentiableEvaluator
Gets the closed-form derivative of the function.

Specified by:
getDerivative in interface ClosedFormDifferentiableEvaluator<Double,Double,Double>
Specified by:
getDerivative in interface SmoothCumulativeDistributionFunction
Returns:
Closed-form derivative of the function.

differentiate

public Double differentiate(Double input)
Description copied from interface: DifferentiableEvaluator
Differentiates the output with respect to the input

Specified by:
differentiate in interface DifferentiableEvaluator<Double,Double,Double>
Parameters:
input - Input about which to compute the derivative
Returns:
Derivative of the output with respect to the given input

inverse

public Double inverse(double probability)
Description copied from interface: InvertibleCumulativeDistributionFunction
Computes the inverse of the CDF for the given probability. That is, compute the value "x" such that p=CDF(x).

Specified by:
inverse in interface InvertibleCumulativeDistributionFunction<Double>
Parameters:
probability - Probability to invert.
Returns:
Inverse of the CDF for the given probability.