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

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.PDF
All Implemented Interfaces:
Evaluator<Double,Double>, Vectorizable, ScalarFunction<Double>, UnivariateScalarFunction, ClosedFormComputableDistribution<Double>, ClosedFormDistribution<Double>, ClosedFormUnivariateDistribution<Double>, ComputableDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, EstimableDistribution<Double,UnivariateGaussian>, ProbabilityDensityFunction<Double>, ProbabilityFunction<Double>, SmoothUnivariateDistribution, UnivariateDistribution<Double>, UnivariateProbabilityDensityFunction, CloneableSerializable, Serializable, Cloneable
Enclosing class:
UnivariateGaussian

public static class UnivariateGaussian.PDF
extends UnivariateGaussian
implements UnivariateProbabilityDensityFunction

PDF of the underlying Gaussian.

See Also:
Serialized Form

Nested Class Summary
 
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.PDF()
          Creates a new instance of UnivariateGaussian with zero mean and unit variance
UnivariateGaussian.PDF(double mean, double variance)
          Creates a new instance of UnivariateGaussian
UnivariateGaussian.PDF(UnivariateGaussian other)
          Copy constructor
 
Method Summary
 double evaluate(double input)
          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 input, double mean, double variance)
          Computes the value of the Probability Density Function at the input
 double evaluateAsDouble(Double input)
          Evaluates the scalar function as a double.
 UnivariateGaussian.PDF getProbabilityFunction()
          Gets the distribution function associated with this Distribution, either the PDF or PMF.
 double logEvaluate(double input)
          Evaluate the natural logarithm of the distribution function.
 double logEvaluate(Double input)
          Evaluate the natural logarithm of the distribution function.
static double logEvaluate(double input, double mean, double variance)
          Computes the natural logarithm of the pdf.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.UnivariateGaussian
clone, convertFromVector, convertToVector, convolve, getCDF, getEstimator, getMaxSupport, getMean, getMinSupport, 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
getCDF, getMean
 
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.PDF

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


UnivariateGaussian.PDF

public UnivariateGaussian.PDF(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.PDF

public UnivariateGaussian.PDF(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 input)
Description copied from interface: UnivariateScalarFunction
Produces a double output for the given double input

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

evaluate

public static double evaluate(double input,
                              double mean,
                              double variance)
Computes the value of the Probability Density Function at the input

Parameters:
input - Input value to compute the PDF at, that is, p(input|mean,variance)
mean - Mean of the distribution
variance - Variance of the distribution
Returns:
Value of the PDF at the input, p(input|mean,variance)

logEvaluate

public double logEvaluate(Double input)
Description copied from interface: ProbabilityFunction
Evaluate the natural logarithm of the distribution function. This is sometimes more efficient than evaluating the distribution function itself, and when evaluating the product of many independent or exchangeable samples.

Specified by:
logEvaluate in interface ProbabilityFunction<Double>
Returns:
Natural logarithm of the distribution function.

logEvaluate

public double logEvaluate(double input)
Description copied from interface: UnivariateProbabilityDensityFunction
Evaluate the natural logarithm of the distribution function. This is sometimes more efficient than evaluating the distribution function itself, and when evaluating the product of many independent or exchangeable samples.

Specified by:
logEvaluate in interface UnivariateProbabilityDensityFunction
Parameters:
input - The input value.
Returns:
The natural logarithm of the distribution function.

logEvaluate

public static double logEvaluate(double input,
                                 double mean,
                                 double variance)
Computes the natural logarithm of the pdf.

Parameters:
input - Input to consider.
mean - Mean of the Gaussian.
variance - Variance of the Gaussian.
Returns:
Natural logarithm of the pdf.

getProbabilityFunction

public UnivariateGaussian.PDF getProbabilityFunction()
Description copied from interface: ComputableDistribution
Gets the distribution function associated with this Distribution, either the PDF or PMF.

Specified by:
getProbabilityFunction in interface ComputableDistribution<Double>
Specified by:
getProbabilityFunction in interface ProbabilityDensityFunction<Double>
Specified by:
getProbabilityFunction in interface SmoothUnivariateDistribution
Specified by:
getProbabilityFunction in interface UnivariateProbabilityDensityFunction
Overrides:
getProbabilityFunction in class UnivariateGaussian
Returns:
Distribution function associated with this Distribution.