Search Results for

    Show / Hide Table of Contents

    Class ProductWishartOp

    Provides outgoing messages for the following factors:

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

    Inheritance
    Object
    ProductWishartOp
    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(PositiveDefiniteMatrix), typeof(double)})]
    [FactorMethod(new string[]{"Product", "b", "a"}, typeof(Factor), "Product", new Type[]{typeof(double), typeof(PositiveDefiniteMatrix)})]
    [Quality(QualityBand.Experimental)]
    public static class ProductWishartOp

    Methods

    AAverageConditional(Wishart, Double, Wishart)

    EP message to a.

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

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

    Double B

    Constant value for b.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

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

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    AAverageLogarithm(Wishart, Gamma, Wishart)

    VMP message to a.

    Declaration
    public static Wishart AAverageLogarithm(Wishart Product, Gamma B, Wishart result)
    Parameters
    Type Name Description
    Wishart Product

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

    Gamma B

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

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except a. Because the factor is deterministic, product is integrated out before taking the logarithm. The formula is exp(sum_(b) p(b) log(sum_product p(product) factor(product,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    AAverageLogarithm(Wishart, Double, Wishart)

    VMP message to a.

    Declaration
    public static Wishart AAverageLogarithm(Wishart Product, double B, Wishart result)
    Parameters
    Type Name Description
    Wishart Product

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

    Double B

    Constant value for b.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

    The outgoing message is the factor viewed as a function of a with product integrated out. The formula is sum_product p(product) factor(product,a,b).

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    AAverageLogarithm(PositiveDefiniteMatrix, Gamma, Wishart)

    VMP message to a.

    Declaration
    [NotSupported("Variational Message Passing does not support a Product factor with fixed output and two random inputs.")]
    public static Wishart AAverageLogarithm(PositiveDefiniteMatrix Product, Gamma B, Wishart result)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix Product

    Constant value for product.

    Gamma B

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

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except a. The formula is exp(sum_(b) p(b) log(factor(product,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    B is not a proper distribution.

    AAverageLogarithm(PositiveDefiniteMatrix, Double, Wishart)

    VMP message to a.

    Declaration
    public static Wishart AAverageLogarithm(PositiveDefiniteMatrix Product, double B, Wishart result)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix Product

    Constant value for product.

    Double B

    Constant value for b.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

    AverageLogFactor(Wishart)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Wishart product)
    Parameters
    Type Name Description
    Wishart product

    Incoming message from product.

    Returns
    Type Description
    Double

    Zero.

    Remarks

    In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    BAverageConditional(Wishart, PositiveDefiniteMatrix)

    EP message to b.

    Declaration
    public static Gamma BAverageConditional(Wishart Product, PositiveDefiniteMatrix A)
    Parameters
    Type Name Description
    Wishart Product

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

    PositiveDefiniteMatrix A

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

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    BAverageConditional(PositiveDefiniteMatrix, PositiveDefiniteMatrix)

    EP message to b.

    Declaration
    public static Gamma BAverageConditional(PositiveDefiniteMatrix Product, PositiveDefiniteMatrix A)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix Product

    Constant value for product.

    PositiveDefiniteMatrix 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.

    BAverageLogarithm(Wishart, Wishart)

    VMP message to b.

    Declaration
    public static Gamma BAverageLogarithm(Wishart Product, Wishart A)
    Parameters
    Type Name Description
    Wishart Product

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

    Wishart A

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

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the b argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except b. Because the factor is deterministic, product is integrated out before taking the logarithm. The formula is exp(sum_(a) p(a) log(sum_product p(product) factor(product,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    ImproperMessageException

    A is not a proper distribution.

    BAverageLogarithm(Wishart, PositiveDefiniteMatrix)

    VMP message to b.

    Declaration
    public static Gamma BAverageLogarithm(Wishart Product, PositiveDefiniteMatrix A)
    Parameters
    Type Name Description
    Wishart Product

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

    PositiveDefiniteMatrix A

    Constant value for a.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the b argument.

    Remarks

    The outgoing message is the factor viewed as a function of b with product integrated out. The formula is sum_product p(product) factor(product,a,b).

    Exceptions
    Type Condition
    ImproperMessageException

    Product is not a proper distribution.

    BAverageLogarithm(PositiveDefiniteMatrix, Wishart)

    VMP message to b.

    Declaration
    [NotSupported("Variational Message Passing does not support a Product factor with fixed output and two random inputs.")]
    public static Gamma BAverageLogarithm(PositiveDefiniteMatrix Product, Wishart A)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix Product

    Constant value for product.

    Wishart A

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

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the b argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except b. The formula is exp(sum_(a) p(a) log(factor(product,a,b))).

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    BAverageLogarithm(PositiveDefiniteMatrix, PositiveDefiniteMatrix)

    VMP message to b.

    Declaration
    public static Gamma BAverageLogarithm(PositiveDefiniteMatrix Product, PositiveDefiniteMatrix A)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix Product

    Constant value for product.

    PositiveDefiniteMatrix A

    Constant value for a.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the b argument.

    Remarks

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

    LogEvidenceRatio(Wishart, Wishart, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Wishart product, Wishart a, double b)
    Parameters
    Type Name Description
    Wishart product

    Incoming message from product.

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

    LogEvidenceRatio(Wishart, PositiveDefiniteMatrix, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Wishart product, PositiveDefiniteMatrix a, Gamma b)
    Parameters
    Type Name Description
    Wishart product

    Incoming message from product.

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

    LogEvidenceRatio(PositiveDefiniteMatrix, Wishart, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(PositiveDefiniteMatrix product, Wishart a, double b)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix product

    Constant value for product.

    Wishart 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(product,a,b)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    ProductAverageConditional(Wishart, PositiveDefiniteMatrix, Gamma, Gamma, Wishart)

    EP message to product.

    Declaration
    public static Wishart ProductAverageConditional(Wishart Product, PositiveDefiniteMatrix A, Gamma B, Gamma to_B, Wishart result)
    Parameters
    Type Name Description
    Wishart Product

    Incoming message from product.

    PositiveDefiniteMatrix A

    Constant value for a.

    Gamma B

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

    Gamma to_B

    Previous outgoing message to B.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

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

    Exceptions
    Type Condition
    ImproperMessageException

    B is not a proper distribution.

    ProductAverageConditional(Wishart, Double, Wishart)

    EP message to product.

    Declaration
    public static Wishart ProductAverageConditional(Wishart A, double B, Wishart result)
    Parameters
    Type Name Description
    Wishart A

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

    Double B

    Constant value for b.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

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

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    ProductAverageConditional(PositiveDefiniteMatrix, Double, Wishart)

    EP message to product.

    Declaration
    public static Wishart ProductAverageConditional(PositiveDefiniteMatrix A, double B, Wishart result)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix A

    Constant value for a.

    Double B

    Constant value for b.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

    ProductAverageLogarithm(Wishart, Gamma, Wishart)

    VMP message to product.

    Declaration
    public static Wishart ProductAverageLogarithm(Wishart A, Gamma B, Wishart result)
    Parameters
    Type Name Description
    Wishart A

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

    Gamma B

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

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

    ImproperMessageException

    B is not a proper distribution.

    ProductAverageLogarithm(Wishart, Double, Wishart)

    VMP message to product.

    Declaration
    public static Wishart ProductAverageLogarithm(Wishart A, double B, Wishart result)
    Parameters
    Type Name Description
    Wishart A

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

    Double B

    Constant value for b.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    A is not a proper distribution.

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