Search Results for

    Show / Hide Table of Contents

    Class GaussianOp_Slow

    Provides outgoing messages for the following factors:

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

    Inheritance
    Object
    GaussianOpBase
    GaussianOp_Slow
    Inherited Members
    GaussianOpBase.SampleAverageConditional(Double, Double)
    GaussianOpBase.MeanAverageConditional(Double, Double)
    GaussianOpBase.PrecisionAverageConditional(Double, Double)
    GaussianOpBase.SampleAverageConditional(Gaussian, Double)
    GaussianOpBase.MeanAverageConditional(Gaussian, Double)
    GaussianOpBase.LogAverageFactor(Double, Double, Double)
    GaussianOpBase.LogAverageFactor(Gaussian, Gaussian, Double)
    GaussianOpBase.LogAverageFactor(Gaussian, Double, Double)
    GaussianOpBase.LogAverageFactor(Double, Gaussian, Double)
    GaussianOpBase.LogAverageFactor(Double, Double, Gamma)
    GaussianOpBase.TPdfLn(Double, Double, Double)
    GaussianOpBase.LogEvidenceRatio(Double, Double, Double)
    GaussianOpBase.LogEvidenceRatio(Gaussian, Gaussian, Double)
    GaussianOpBase.LogEvidenceRatio(Gaussian, Double, Double)
    GaussianOpBase.LogEvidenceRatio(Double, Gaussian, Double)
    GaussianOpBase.LogEvidenceRatio(Double, Double, Gamma)
    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
    [FactorMethod(typeof(Gaussian), "Sample", new Type[]{typeof(double), typeof(double)}, Default = false)]
    [FactorMethod(new string[]{"sample", "mean", "precision"}, typeof(Factor), "Gaussian", new Type[]{}, Default = false)]
    [Quality(QualityBand.Experimental)]
    public class GaussianOp_Slow : GaussianOpBase

    Fields

    QuadratureNodeCount

    Declaration
    public static int QuadratureNodeCount
    Field Value
    Type Description
    Int32

    Methods

    FindZeroes(Func<Double, Double>, Func<Double, Double>, IList<Double>, IList<Double>)

    Find all zeroes of a function, given its stationary points and inflection points

    Declaration
    public static List<double> FindZeroes(Func<double, double> func, Func<double, double> deriv, IList<double> stationaryPoints, IList<double> inflectionPoints)
    Parameters
    Type Name Description
    Func<Double, Double> func
    Func<Double, Double> deriv
    IList<Double> stationaryPoints
    IList<Double> inflectionPoints
    Returns
    Type Description
    List<Double>

    GetIntegrationBoundsForPrecision(Double, Double, Double, Double, out Double, out Double, out Double)

    Declaration
    public static void GetIntegrationBoundsForPrecision(double m, double v, double a, double b, out double logrmin, out double logrmax, out double logrmode)
    Parameters
    Type Name Description
    Double m
    Double v
    Double a
    Double b
    Double logrmin
    Double logrmax
    Double logrmode

    GetRealRoots(IList<Double>, out List<Double>, Predicate<Double>)

    Get the real roots of a polynomial

    Declaration
    public static void GetRealRoots(IList<double> coeffs, out List<double> roots, Predicate<double> filter = null)
    Parameters
    Type Name Description
    IList<Double> coeffs

    Coefficients of the polynomial, starting from the highest degree monomial down to the constant term

    List<Double> roots

    On exit, the real roots

    Predicate<Double> filter

    If not null, only roots where filter returns true are included

    GetRoots(IList<Double>, out Double[], out Double[])

    Get the complex roots of a polynomial

    Declaration
    public static void GetRoots(IList<double> coeffs, out double[] rootsReal, out double[] rootsImag)
    Parameters
    Type Name Description
    IList<Double> coeffs

    Coefficients of the polynomial, starting from the highest degree monomial down to the constant term

    Double[] rootsReal

    On exit, the real part of the roots

    Double[] rootsImag

    On exit, the imaginary part of the roots

    LogAverageFactor(Gaussian, Gaussian, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gaussian sample, Gaussian mean, Gamma 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.

    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_(sample,mean,precision) p(sample,mean,precision) factor(sample,mean,precision)).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    precision is not a proper distribution.

    LogEvidenceRatio(Gaussian, Gaussian, Gamma, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian sample, Gaussian mean, Gamma precision, Gaussian to_sample)
    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.

    Gamma precision

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

    Gaussian to_sample

    Outgoing message to sample.

    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,precision) p(sample,mean,precision) 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.

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    precision is not a proper distribution.

    LogEvidenceRatio(Double, Gaussian, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double sample, Gaussian mean, Gamma 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.

    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_(mean,precision) p(mean,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

    mean is not a proper distribution.

    ImproperMessageException

    precision is not a proper distribution.

    MeanAverageConditional(Gaussian, Gaussian, Gamma)

    EP message to mean.

    Declaration
    public static Gaussian MeanAverageConditional(Gaussian sample, Gaussian mean, Gamma 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.

    Gamma precision

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

    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,precision) p(sample,precision) factor(sample,mean,precision)]/p(mean).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    precision is not a proper distribution.

    PrecisionAverageConditional(Gaussian, Gaussian, Gamma)

    EP message to precision.

    Declaration
    public static Gamma PrecisionAverageConditional(Gaussian sample, Gaussian mean, Gamma 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.

    Gamma precision

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

    Returns
    Type Description
    Gamma

    The outgoing EP message to the precision argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    precision is not a proper distribution.

    SampleAverageConditional(Gaussian, Gaussian, Gamma)

    EP message to sample.

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

    Incoming message from sample.

    Gaussian mean

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

    Gamma precision

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

    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,precision) p(mean,precision) factor(sample,mean,precision)]/p(sample).

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    precision is not a proper distribution.

    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.