Class ProductWishartOp
Provides outgoing messages for the following factors:
, given random arguments to the function.Inherited Members
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 |
Double | B | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
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 |
Gamma | B | Incoming message from |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
ImproperMessageException |
|
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 |
Double | B | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
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 |
Gamma | B | Incoming message from |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
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 |
Double | B | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
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 |
PositiveDefiniteMatrix | A | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
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 |
|
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 |
PositiveDefiniteMatrix | A | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
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 |
Wishart | A | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
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 |
|
ImproperMessageException |
|
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 |
PositiveDefiniteMatrix | A | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
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 |
|
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 |
Wishart | A | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
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 |
|
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 |
PositiveDefiniteMatrix | A | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
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 |
Wishart | a | Incoming message from |
Double | b | Constant value for |
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 |
PositiveDefiniteMatrix | a | Constant value for |
Gamma | b | Incoming message from |
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 |
Wishart | a | Incoming message from |
Double | b | Constant value for |
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 |
PositiveDefiniteMatrix | A | Constant value for |
Gamma | B | Incoming message from |
Gamma | to_B | Previous outgoing message to |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
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 |
Double | B | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
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 |
Double | B | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
Gamma | B | Incoming message from |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|
ImproperMessageException |
|
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 |
Double | B | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
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 |
|