public static class UnivariateGaussian.CDF extends UnivariateGaussian implements SmoothCumulativeDistributionFunction, InvertibleCumulativeDistributionFunction<java.lang.Double>
Modifier and Type | Class and Description |
---|---|
static class |
UnivariateGaussian.CDF.Inverse
Inverts the CumulativeDistribution function.
|
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 |
---|
CDF()
Creates a new instance of UnivariateGaussian
with zero mean and unit variance
|
CDF(double mean,
double variance)
Creates a new instance of UnivariateGaussian
|
CDF(UnivariateGaussian other)
Copy constructor
|
Modifier and Type | Method and Description |
---|---|
java.lang.Double |
differentiate(java.lang.Double input)
Differentiates the output with respect to the input
|
double |
evaluate(double z)
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 z,
double mean,
double variance)
Computes the cumulative distribution of a Normalized Gaussian
distribution using the errorFunction method.
|
double |
evaluateAsDouble(java.lang.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.
|
java.lang.Double |
inverse(double probability)
Computes the inverse of the CDF for the given probability.
|
clone, convertFromVector, convertToVector, convolve, getEstimator, getMaxSupport, getMean, getMeanAsDouble, getMinSupport, getProbabilityFunction, getStandardDeviation, getVariance, sampleAsDouble, sampleInto, setMean, setVariance, times, toString
sampleAsDoubles, sampleInto
sample, sample
equals, finalize, getClass, hashCode, notify, notifyAll, wait, wait, wait
getMean, getProbabilityFunction, sampleAsDouble, sampleAsDoubles, sampleInto
getMaxSupport, getMeanAsDouble, getMinSupport, getVariance
sample, sample, sampleInto
clone, convertFromVector, convertToVector
public CDF()
public CDF(double mean, double variance)
mean
- First central moment (expectation) of the distributionvariance
- Second central moment (square of standard deviation) of the distributionpublic CDF(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 z)
UnivariateScalarFunction
evaluate
in interface UnivariateScalarFunction
z
- Input to the Evaluatorpublic static double evaluate(double z, double mean, double variance)
mean
- Mean of the PDFvariance
- Variance of the PDFz
- value to compute the Gaussian cdf atpublic UnivariateGaussian.CDF getCDF()
UnivariateDistribution
getCDF
in interface ClosedFormUnivariateDistribution<java.lang.Double>
getCDF
in interface SmoothUnivariateDistribution
getCDF
in interface UnivariateDistribution<java.lang.Double>
getCDF
in class UnivariateGaussian
public UnivariateGaussian.PDF getDerivative()
ClosedFormDifferentiableEvaluator
getDerivative
in interface ClosedFormDifferentiableEvaluator<java.lang.Double,java.lang.Double,java.lang.Double>
getDerivative
in interface SmoothCumulativeDistributionFunction
public java.lang.Double differentiate(java.lang.Double input)
DifferentiableEvaluator
differentiate
in interface DifferentiableEvaluator<java.lang.Double,java.lang.Double,java.lang.Double>
input
- Input about which to compute the derivativepublic java.lang.Double inverse(double probability)
InvertibleCumulativeDistributionFunction
inverse
in interface InvertibleCumulativeDistributionFunction<java.lang.Double>
probability
- Probability to invert.