public static class UnivariateGaussian.PDF extends UnivariateGaussian implements UnivariateProbabilityDensityFunction
UnivariateGaussian.CDF, UnivariateGaussian.ErrorFunction, UnivariateGaussian.IncrementalEstimator, UnivariateGaussian.MaximumLikelihoodEstimator, UnivariateGaussian.PDF, UnivariateGaussian.SufficientStatistic, UnivariateGaussian.WeightedMaximumLikelihoodEstimator
BIG_Z, DEFAULT_MEAN, DEFAULT_VARIANCE, mean, PI2, SQRT2, variance
Constructor and Description |
---|
PDF()
Creates a new instance of UnivariateGaussian
with zero mean and unit variance
|
PDF(double mean,
double variance)
Creates a new instance of UnivariateGaussian
|
PDF(UnivariateGaussian other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
double |
evaluate(double input)
Produces a double output for the given double input
|
java.lang.Double |
evaluate(java.lang.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(java.lang.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(java.lang.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.
|
clone, convertFromVector, convertToVector, convolve, getCDF, getEstimator, getMaxSupport, getMean, getMeanAsDouble, getMinSupport, getStandardDeviation, getVariance, sampleAsDouble, sampleInto, setMean, setVariance, times, toString
sampleAsDoubles, sampleInto
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getCDF, getMean, sampleAsDouble, sampleAsDoubles, sampleInto
getMaxSupport, getMeanAsDouble, getMinSupport, getVariance
sample, sample, sampleInto
clone, convertFromVector, convertToVector
public PDF()
public PDF(double mean, double variance)
mean
- First central moment (expectation) of the distributionvariance
- Second central moment (square of standard deviation) of the distributionpublic PDF(UnivariateGaussian other)
other
- UnivariateGaussian to copypublic java.lang.Double evaluate(java.lang.Double input)
Evaluator
evaluate
in interface Evaluator<java.lang.Double,java.lang.Double>
evaluate
in interface ScalarFunction<java.lang.Double>
evaluate
in interface UnivariateScalarFunction
input
- The input to evaluate.public double evaluateAsDouble(java.lang.Double input)
ScalarFunction
evaluateAsDouble
in interface ScalarFunction<java.lang.Double>
evaluateAsDouble
in interface UnivariateScalarFunction
input
- The input value.public double evaluate(double input)
UnivariateScalarFunction
evaluate
in interface UnivariateScalarFunction
input
- Input to the Evaluatorpublic static double evaluate(double input, double mean, double variance)
input
- Input value to compute the PDF at, that is, p(input|mean,variance)mean
- Mean of the distributionvariance
- Variance of the distributionpublic double logEvaluate(java.lang.Double input)
ProbabilityFunction
logEvaluate
in interface ProbabilityFunction<java.lang.Double>
input
- The input to be evaluatedpublic double logEvaluate(double input)
UnivariateProbabilityDensityFunction
logEvaluate
in interface UnivariateProbabilityDensityFunction
input
- The input value.public static double logEvaluate(double input, double mean, double variance)
input
- Input to consider.mean
- Mean of the Gaussian.variance
- Variance of the Gaussian.public UnivariateGaussian.PDF getProbabilityFunction()
ComputableDistribution
getProbabilityFunction
in interface ComputableDistribution<java.lang.Double>
getProbabilityFunction
in interface ProbabilityDensityFunction<java.lang.Double>
getProbabilityFunction
in interface SmoothUnivariateDistribution
getProbabilityFunction
in interface UnivariateProbabilityDensityFunction
getProbabilityFunction
in class UnivariateGaussian