Search Results for

    Show / Hide Table of Contents

    Class GaussianProductOp_SHG09

    Provides outgoing messages for the following factors:

    • Product(Double, Double)
    • Product_SHG09(Double, Double)
    , given random arguments to the function.

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

    This class allows EP to process the product factor as if running VMP, as required by Stern's algorithm. The algorithm comes from "Matchbox: Large Scale Online Bayesian Recommendations" by David Stern, Ralf Herbrich, and Thore Graepel, WWW 2009.

    Methods

    AAverageConditional(Gaussian, Gaussian, Gaussian)

    EP message to a.

    Declaration
    public static Gaussian AAverageConditional(Gaussian Product, Gaussian B, Gaussian to_B)
    Parameters
    Type Name Description
    Gaussian Product

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

    Gaussian B

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

    Gaussian to_B

    Previous outgoing message to B.

    Returns
    Type Description
    Gaussian

    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_(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.

    AAverageConditional(Gaussian, Double)

    EP message to a.

    Declaration
    public static Gaussian AAverageConditional(Gaussian Product, double B)
    Parameters
    Type Name Description
    Gaussian Product

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

    Double B

    Constant value for b.

    Returns
    Type Description
    Gaussian

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

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    BAverageConditional(Gaussian, Gaussian, Gaussian)

    EP message to b.

    Declaration
    public static Gaussian BAverageConditional(Gaussian Product, Gaussian A, Gaussian to_A)
    Parameters
    Type Name Description
    Gaussian Product

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

    Gaussian A

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

    Gaussian to_A

    Previous outgoing message to A.

    Returns
    Type Description
    Gaussian

    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_(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.

    BAverageConditional(Gaussian, Double)

    EP message to b.

    Declaration
    public static Gaussian BAverageConditional(Gaussian Product, double A)
    Parameters
    Type Name Description
    Gaussian Product

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

    Double A

    Constant value for a.

    Returns
    Type Description
    Gaussian

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

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    LogEvidenceRatio(Gaussian, Gaussian, Gaussian, Gaussian, Gaussian, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian Product, Gaussian A, Gaussian B, Gaussian to_A, Gaussian to_B, Gaussian to_product)
    Parameters
    Type Name Description
    Gaussian Product

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

    Gaussian A

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

    Gaussian B

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

    Gaussian to_A

    Previous outgoing message to A.

    Gaussian to_B

    Previous outgoing message to B.

    Gaussian to_product

    Previous outgoing message to product.

    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.

    ImproperMessageException

    A is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    LogEvidenceRatio(Gaussian, Gaussian, Double, Gaussian, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian Product, Gaussian A, double B, Gaussian to_A, Gaussian to_product)
    Parameters
    Type Name Description
    Gaussian Product

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

    Gaussian A

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

    Double B

    Constant value for b.

    Gaussian to_A

    Previous outgoing message to A.

    Gaussian to_product

    Previous outgoing message to product.

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

    ImproperMessageException

    A is not a proper distribution.

    LogEvidenceRatio(Gaussian, Double, Gaussian, Gaussian, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gaussian Product, double A, Gaussian B, Gaussian to_B, Gaussian to_product)
    Parameters
    Type Name Description
    Gaussian Product

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

    Double A

    Constant value for a.

    Gaussian B

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

    Gaussian to_B

    Previous outgoing message to B.

    Gaussian to_product

    Previous outgoing message to product.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(product,b) p(product,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.

    ImproperMessageException

    B is not a proper distribution.

    ProductAverageConditional(Gaussian, Gaussian, Gaussian, Gaussian)

    EP message to product.

    Declaration
    public static Gaussian ProductAverageConditional(Gaussian A, Gaussian B, Gaussian to_A, Gaussian to_B)
    Parameters
    Type Name Description
    Gaussian A

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

    Gaussian B

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

    Gaussian to_A

    Previous outgoing message to A.

    Gaussian to_B

    Previous outgoing message to B.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the product argument.

    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.

    ProductAverageConditional(Gaussian, Double, Gaussian)

    EP message to product.

    Declaration
    public static Gaussian ProductAverageConditional(Gaussian A, double B, Gaussian to_A)
    Parameters
    Type Name Description
    Gaussian A

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

    Double B

    Constant value for b.

    Gaussian to_A

    Previous outgoing message to A.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the product argument.

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

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    ProductAverageConditional(Double, Gaussian, Gaussian)

    EP message to product.

    Declaration
    public static Gaussian ProductAverageConditional(double A, Gaussian B, Gaussian to_B)
    Parameters
    Type Name Description
    Double A

    Constant value for a.

    Gaussian B

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

    Gaussian to_B

    Previous outgoing message to B.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the product argument.

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

    Exceptions
    Type Condition
    ImproperMessageException

    B is not a proper distribution.

    ProductAverageConditional2(Gaussian, Gaussian, Gaussian, Gaussian, Gaussian)

    Declaration
    public static Gaussian ProductAverageConditional2(Gaussian product, Gaussian A, Gaussian B, Gaussian to_A, Gaussian to_B)
    Parameters
    Type Name Description
    Gaussian product
    Gaussian A
    Gaussian B
    Gaussian to_A
    Gaussian to_B
    Returns
    Type Description
    Gaussian
    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.