Search Results for

    Show / Hide Table of Contents

    Class GammaPowerProductOp_Laplace

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

    Inheritance
    Object
    GammaPowerProductOp_Laplace
    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), "Product", new Type[]{typeof(double), typeof(double)})]
    [Buffers(new string[]{"Q"})]
    [Quality(QualityBand.Experimental)]
    public static class GammaPowerProductOp_Laplace

    Methods

    AAverageConditional(GammaPower, GammaPower, GammaPower, Gamma, GammaPower)

    EP message to a.

    Declaration
    public static GammaPower AAverageConditional(GammaPower product, GammaPower A, GammaPower B, Gamma q, GammaPower result)
    Parameters
    Type Name Description
    GammaPower product

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

    GammaPower A

    Incoming message from a.

    GammaPower B

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

    Gamma q

    Buffer q.

    GammaPower result

    Modified to contain the outgoing message.

    Returns
    Type Description
    GammaPower

    result

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

    Exceptions
    Type Condition
    ImproperMessageException

    product is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    BAverageConditional(GammaPower, GammaPower, GammaPower, Gamma, GammaPower)

    EP message to b.

    Declaration
    public static GammaPower BAverageConditional(GammaPower product, GammaPower A, GammaPower B, Gamma q, GammaPower result)
    Parameters
    Type Name Description
    GammaPower product

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

    GammaPower A

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

    GammaPower B

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

    Gamma q

    Buffer q.

    GammaPower result

    Modified to contain the outgoing message.

    Returns
    Type Description
    GammaPower

    result

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

    Exceptions
    Type Condition
    ImproperMessageException

    product is not a proper distribution.

    ImproperMessageException

    A is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    LogAverageFactor(GammaPower, GammaPower, GammaPower, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(GammaPower product, GammaPower A, GammaPower B, Gamma q)
    Parameters
    Type Name Description
    GammaPower product

    Incoming message from product.

    GammaPower A

    Incoming message from a.

    GammaPower B

    Incoming message from b.

    Gamma q

    Buffer q.

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

    LogEvidenceRatio(GammaPower, GammaPower, GammaPower, GammaPower, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(GammaPower product, GammaPower A, GammaPower B, GammaPower to_product, Gamma q)
    Parameters
    Type Name Description
    GammaPower product

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

    GammaPower A

    Incoming message from a.

    GammaPower B

    Incoming message from b.

    GammaPower to_product

    Previous outgoing message to product.

    Gamma q

    Buffer q.

    Returns
    Type Description
    Double

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

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    product is not a proper distribution.

    LogEvidenceRatio(Double, GammaPower, GammaPower, Gamma)

    Evidence message for EP.

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

    Constant value for product.

    GammaPower A

    Incoming message from a.

    GammaPower B

    Incoming message from b.

    Gamma q

    Buffer q.

    Returns
    Type Description
    Double

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

    Remarks

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

    ProductAverageConditional(GammaPower, GammaPower, GammaPower, Gamma, GammaPower)

    EP message to product.

    Declaration
    public static GammaPower ProductAverageConditional(GammaPower product, GammaPower A, GammaPower B, Gamma q, GammaPower result)
    Parameters
    Type Name Description
    GammaPower product

    Incoming message from product.

    GammaPower A

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

    GammaPower B

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

    Gamma q

    Buffer q.

    GammaPower result

    Modified to contain the outgoing message.

    Returns
    Type Description
    GammaPower

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    Q(GammaPower, GammaPower, GammaPower)

    Update the buffer Q.

    Declaration
    public static Gamma Q(GammaPower product, GammaPower A, GammaPower B)
    Parameters
    Type Name Description
    GammaPower product

    Incoming message from product.

    GammaPower A

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

    GammaPower B

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

    Returns
    Type Description
    Gamma

    New value of buffer Q.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    QInit()

    Initialize the buffer Q.

    Declaration
    public static Gamma QInit()
    Returns
    Type Description
    Gamma

    Initial value of buffer Q.

    Remarks

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