Search Results for

    Show / Hide Table of Contents

    Class GaussianOpBase

    Provides outgoing messages for the following factors:

    • Sample(Double, Double)
    • Gaussian(Double, Double)
    , given random arguments to the function.

    Inheritance
    Object
    GaussianOpBase
    GaussianOp
    GaussianOp_EM
    GaussianOp_Laplace
    GaussianOp_PointPrecision
    GaussianOp_Slow
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Factors
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    public class GaussianOpBase

    Methods

    LogAverageFactor(Gaussian, Gaussian, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gaussian sample, Gaussian mean, double precision)
    Parameters
    Type Name Description
    Gaussian sample

    Incoming message from sample. Must be a proper distribution. If uniform, the result will be uniform.

    Gaussian mean

    Incoming message from mean. Must be a proper distribution. If uniform, the result will be uniform.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Remarks

    The formula for the result is log(sum_(sample,mean) p(sample,mean) factor(sample,mean,precision)).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    mean is not a proper distribution.

    LogAverageFactor(Gaussian, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gaussian sample, double mean, double precision)
    Parameters
    Type Name Description
    Gaussian sample

    Incoming message from sample. Must be a proper distribution. If uniform, the result will be uniform.

    Double mean

    Constant value for mean.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Remarks

    The formula for the result is log(sum_(sample) p(sample) factor(sample,mean,precision)).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    LogAverageFactor(Double, Gaussian, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double sample, Gaussian mean, double precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gaussian mean

    Incoming message from mean. Must be a proper distribution. If uniform, the result will be uniform.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Remarks

    The formula for the result is log(sum_(mean) p(mean) factor(sample,mean,precision)).

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    LogAverageFactor(Double, Double, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double sample, double mean, Gamma precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double mean

    Constant value for mean.

    Gamma precision

    Incoming message from precision. Must be a proper distribution. If uniform, the result will be uniform.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Remarks

    The formula for the result is log(sum_(precision) p(precision) factor(sample,mean,precision)).

    Exceptions
    Type Condition
    ImproperMessageException

    precision is not a proper distribution.

    LogAverageFactor(Double, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double sample, double mean, double precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double mean

    Constant value for mean.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Remarks

    The formula for the result is log(factor(sample,mean,precision)).

    LogEvidenceRatio(Gaussian, Gaussian, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian sample, Gaussian mean, double precision)
    Parameters
    Type Name Description
    Gaussian sample

    Incoming message from sample.

    Gaussian mean

    Incoming message from mean.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(sample,mean) p(sample,mean) factor(sample,mean,precision) / sum_sample p(sample) messageTo(sample)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Gaussian, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian sample, double mean, double precision)
    Parameters
    Type Name Description
    Gaussian sample

    Incoming message from sample.

    Double mean

    Constant value for mean.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(sample) p(sample) factor(sample,mean,precision) / sum_sample p(sample) messageTo(sample)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Double, Gaussian, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double sample, Gaussian mean, double precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gaussian mean

    Incoming message from mean. Must be a proper distribution. If uniform, the result will be uniform.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(mean) p(mean) factor(sample,mean,precision)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    LogEvidenceRatio(Double, Double, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double sample, double mean, Gamma precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double mean

    Constant value for mean.

    Gamma precision

    Incoming message from precision. Must be a proper distribution. If uniform, the result will be uniform.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(precision) p(precision) factor(sample,mean,precision)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    Exceptions
    Type Condition
    ImproperMessageException

    precision is not a proper distribution.

    LogEvidenceRatio(Double, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double sample, double mean, double precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double mean

    Constant value for mean.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(factor(sample,mean,precision)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    MeanAverageConditional(Gaussian, Double)

    EP message to mean.

    Declaration
    public static Gaussian MeanAverageConditional(Gaussian sample, double precision)
    Parameters
    Type Name Description
    Gaussian sample

    Incoming message from sample. Must be a proper distribution. If uniform, the result will be uniform.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the mean argument.

    Remarks

    The outgoing message is a distribution matching the moments of mean as the random arguments are varied. The formula is proj[p(mean) sum_(sample) p(sample) factor(sample,mean,precision)]/p(mean).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    MeanAverageConditional(Double, Double)

    EP message to mean.

    Declaration
    public static Gaussian MeanAverageConditional(double sample, double precision)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the mean argument.

    Remarks

    The outgoing message is the factor viewed as a function of mean conditioned on the given values.

    PrecisionAverageConditional(Double, Double)

    EP message to precision.

    Declaration
    public static Gamma PrecisionAverageConditional(double sample, double mean)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double mean

    Constant value for mean.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the precision argument.

    Remarks

    The outgoing message is the factor viewed as a function of precision conditioned on the given values.

    SampleAverageConditional(Gaussian, Double)

    EP message to sample.

    Declaration
    public static Gaussian SampleAverageConditional(Gaussian mean, double precision)
    Parameters
    Type Name Description
    Gaussian mean

    Incoming message from mean. Must be a proper distribution. If uniform, the result will be uniform.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the sample argument.

    Remarks

    The outgoing message is a distribution matching the moments of sample as the random arguments are varied. The formula is proj[p(sample) sum_(mean) p(mean) factor(sample,mean,precision)]/p(sample).

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    SampleAverageConditional(Double, Double)

    EP message to sample.

    Declaration
    public static Gaussian SampleAverageConditional(double mean, double precision)
    Parameters
    Type Name Description
    Double mean

    Constant value for mean.

    Double precision

    Constant value for precision.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the sample argument.

    Remarks

    The outgoing message is the factor viewed as a function of sample conditioned on the given values.

    TPdfLn(Double, Double, Double)

    Logarithm of Student T density.

    Declaration
    public static double TPdfLn(double x, double v, double n)
    Parameters
    Type Name Description
    Double x

    sample

    Double v

    variance parameter

    Double n

    degrees of freedom plus 1

    Returns
    Type Description
    Double
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.