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

java.lang.Object
  extended by gov.sandia.cognition.util.AbstractCloneableSerializable
      extended by gov.sandia.cognition.statistics.AbstractDistribution<DataType>
          extended by gov.sandia.cognition.statistics.distribution.LinearMixtureModel<Double,SmoothUnivariateDistribution>
              extended by gov.sandia.cognition.statistics.distribution.ScalarMixtureDensityModel
                  extended by gov.sandia.cognition.statistics.distribution.ScalarMixtureDensityModel.PDF
All Implemented Interfaces:
Evaluator<Double,Double>, Vectorizable, ScalarFunction<Double>, UnivariateScalarFunction, ClosedFormComputableDistribution<Double>, ClosedFormDistribution<Double>, ClosedFormUnivariateDistribution<Double>, ComputableDistribution<Double>, Distribution<Double>, DistributionWithMean<Double>, ProbabilityDensityFunction<Double>, ProbabilityFunction<Double>, SmoothUnivariateDistribution, UnivariateDistribution<Double>, UnivariateProbabilityDensityFunction, CloneableSerializable, Serializable, Cloneable
Enclosing class:
ScalarMixtureDensityModel

public static class ScalarMixtureDensityModel.PDF
extends ScalarMixtureDensityModel
implements UnivariateProbabilityDensityFunction

PDF of the SMDM

See Also:
Serialized Form

Nested Class Summary
 
Nested classes/interfaces inherited from class gov.sandia.cognition.statistics.distribution.ScalarMixtureDensityModel
ScalarMixtureDensityModel.CDF, ScalarMixtureDensityModel.EMLearner, ScalarMixtureDensityModel.PDF
 
Field Summary
 
Fields inherited from class gov.sandia.cognition.statistics.distribution.LinearMixtureModel
distributions, priorWeights
 
Constructor Summary
ScalarMixtureDensityModel.PDF()
          Creates a new instance of ScalarMixtureDensityModel
ScalarMixtureDensityModel.PDF(Collection<? extends SmoothUnivariateDistribution> distributions)
          Creates a new instance of ScalarMixtureDensityModel
ScalarMixtureDensityModel.PDF(Collection<? extends SmoothUnivariateDistribution> distributions, double[] priorWeights)
          Creates a new instance of ScalarMixtureDensityModel
ScalarMixtureDensityModel.PDF(ScalarMixtureDensityModel other)
          Copy constructor
ScalarMixtureDensityModel.PDF(SmoothUnivariateDistribution... distributions)
          Creates a new instance of ScalarMixtureDensityModel
 
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.
 double evaluateAsDouble(Double input)
          Evaluates the scalar function as a double.
 ScalarMixtureDensityModel.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.
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.ScalarMixtureDensityModel
clone, convertFromVector, convertToVector, getCDF, getMaxSupport, getMean, getMinSupport, getVariance
 
Methods inherited from class gov.sandia.cognition.statistics.distribution.LinearMixtureModel
getDistributionCount, getDistributions, getPriorWeights, getPriorWeightSum, sample, sample, setDistributions, setPriorWeights, toString
 
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

ScalarMixtureDensityModel.PDF

public ScalarMixtureDensityModel.PDF()
Creates a new instance of ScalarMixtureDensityModel


ScalarMixtureDensityModel.PDF

public ScalarMixtureDensityModel.PDF(SmoothUnivariateDistribution... distributions)
Creates a new instance of ScalarMixtureDensityModel

Parameters:
distributions - Distributions that comprise the SMDM with equal prior weight

ScalarMixtureDensityModel.PDF

public ScalarMixtureDensityModel.PDF(Collection<? extends SmoothUnivariateDistribution> distributions)
Creates a new instance of ScalarMixtureDensityModel

Parameters:
distributions - Distributions that comprise the SMDM with equal prior weight

ScalarMixtureDensityModel.PDF

public ScalarMixtureDensityModel.PDF(Collection<? extends SmoothUnivariateDistribution> distributions,
                                     double[] priorWeights)
Creates a new instance of ScalarMixtureDensityModel

Parameters:
distributions - Distributions that comprise the SMDM
priorWeights - Weights proportionate by which the distributions are sampled

ScalarMixtureDensityModel.PDF

public ScalarMixtureDensityModel.PDF(ScalarMixtureDensityModel other)
Copy constructor

Parameters:
other - SMDM to copy
Method Detail

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.

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

getProbabilityFunction

public ScalarMixtureDensityModel.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 ScalarMixtureDensityModel
Returns:
Distribution function associated with this Distribution.

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.