Search Results for

    Show / Hide Table of Contents

    Class GammaRatioOp

    Provides outgoing messages for Ratio(Double, Double), given random arguments to the function.

    Inheritance
    Object
    GammaRatioOp
    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
    [FactorMethod(typeof(Factor), "Ratio", new Type[]{typeof(double), typeof(double)})]
    [Quality(QualityBand.Preview)]
    public static class GammaRatioOp

    Methods

    AAverageConditional(Gamma, Double)

    EP message to a.

    Declaration
    public static Gamma AAverageConditional(Gamma ratio, double B)
    Parameters
    Type Name Description
    Gamma ratio

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

    Double B

    Constant value for b.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the a argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    ratio is not a proper distribution.

    AAverageConditional(Double, Gamma)

    EP message to a.

    Declaration
    public static Gamma AAverageConditional(double ratio, Gamma B)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Gamma B

    Incoming message from b.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the a argument.

    Remarks

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

    AAverageConditional(Double, Double)

    EP message to a.

    Declaration
    public static Gamma AAverageConditional(double ratio, double B)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Double B

    Constant value for b.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the a argument.

    Remarks

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

    BAverageConditional(Gamma, Double)

    EP message to b.

    Declaration
    public static GammaPower BAverageConditional(Gamma ratio, double A)
    Parameters
    Type Name Description
    Gamma ratio

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

    Double A

    Constant value for a.

    Returns
    Type Description
    GammaPower

    The outgoing EP message to the b argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    ratio is not a proper distribution.

    BAverageConditional(Double, Gamma)

    EP message to b.

    Declaration
    public static Gamma BAverageConditional(double ratio, Gamma A)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Gamma A

    Incoming message from a.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the b argument.

    Remarks

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

    BAverageConditional(Double, Double)

    EP message to b.

    Declaration
    public static Gamma BAverageConditional(double ratio, double A)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Double A

    Constant value for a.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the b argument.

    Remarks

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

    LogAverageFactor(Gamma, Gamma, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gamma ratio, Gamma a, double b)
    Parameters
    Type Name Description
    Gamma ratio

    Incoming message from ratio.

    Gamma a

    Incoming message from a.

    Double b

    Constant value for b.

    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_(ratio,a) p(ratio,a) factor(ratio,a,b)).

    LogAverageFactor(Double, Gamma, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double ratio, Gamma A, Gamma B)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Gamma A

    Incoming message from a.

    Gamma B

    Incoming message from b.

    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_(a,b) p(a,b) factor(ratio,a,b)).

    LogAverageFactor(Double, Gamma, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double ratio, Gamma a, double b)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Gamma a

    Incoming message from a.

    Double b

    Constant value for b.

    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_(a) p(a) factor(ratio,a,b)).

    LogAverageFactor(Double, Double, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double ratio, double A, Gamma B)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Double A

    Constant value for a.

    Gamma B

    Incoming message from b.

    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_(b) p(b) factor(ratio,a,b)).

    LogAverageFactor(Double, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double ratio, double A, double B)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Double A

    Constant value for a.

    Double B

    Constant value for b.

    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(ratio,a,b)).

    LogEvidenceRatio(Gamma, Gamma, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gamma ratio, Gamma a, double b)
    Parameters
    Type Name Description
    Gamma ratio

    Incoming message from ratio.

    Gamma a

    Incoming message from a.

    Double b

    Constant value for b.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(ratio,a) p(ratio,a) factor(ratio,a,b) / sum_ratio p(ratio) messageTo(ratio)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Double, Gamma, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double ratio, Gamma a, double b)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Gamma a

    Incoming message from a.

    Double b

    Constant value for b.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Double, Double, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double ratio, double a, Gamma b)
    Parameters
    Type Name Description
    Double ratio

    Constant value for ratio.

    Double a

    Constant value for a.

    Gamma b

    Incoming message from b.

    Returns
    Type Description
    Double

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

    Remarks

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

    RatioAverageConditional(Gamma, Double)

    EP message to ratio.

    Declaration
    public static Gamma RatioAverageConditional(Gamma A, double B)
    Parameters
    Type Name Description
    Gamma A

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

    Double B

    Constant value for b.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the ratio argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    RatioAverageConditional(Double, Gamma)

    EP message to ratio.

    Declaration
    public static GammaPower RatioAverageConditional(double A, Gamma B)
    Parameters
    Type Name Description
    Double A

    Constant value for a.

    Gamma B

    Incoming message from b.

    Returns
    Type Description
    GammaPower

    The outgoing EP message to the ratio argument.

    Remarks

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

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