Class GaussianProductOp
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(double), typeof(double)}, Default = true)]
[FactorMethod(new string[]{"A", "Product", "B"}, typeof(Factor), "Ratio", new Type[]{typeof(double), typeof(double)}, Default = true)]
[Quality(QualityBand.Mature)]
public class GaussianProductOp : GaussianProductOpEvidenceBase
Fields
ForceProper
Force proper messages
Declaration
public static bool ForceProper
Field Value
Type | Description |
---|---|
Boolean |
QuadratureNodeCount
The number of quadrature nodes used to compute the messages. Reduce this number to save time in exchange for less accuracy. Must be an odd number.
Declaration
public static int QuadratureNodeCount
Field Value
Type | Description |
---|---|
Int32 |
Methods
AAverageConditional(Gaussian, Gaussian, Gaussian)
EP message to a
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian AAverageConditional(Gaussian Product, Gaussian A, Gaussian B)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Product | Incoming message from |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
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 |
|
ImproperMessageException |
|
AAverageConditional(Double, Gaussian, Gaussian)
EP message to a
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian AAverageConditional(double Product, Gaussian A, Gaussian B)
Parameters
Type | Name | Description |
---|---|---|
Double | Product | Constant value for |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
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(product,a,b)]/p(a)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ADerivatives(Double, Double, Double, Gaussian, out Double, out Double)
Compute the derivatives of the logarithm of the marginalized factor.
Declaration
public static void ADerivatives(double a, double mB, double vB, Gaussian Product, out double dlogf, out double ddlogf)
Parameters
Type | Name | Description |
---|---|---|
Double | a | The point to evaluate the derivatives |
Double | mB | |
Double | vB | |
Gaussian | Product | |
Double | dlogf | |
Double | ddlogf |
BAverageConditional(Gaussian, Gaussian, Gaussian)
EP message to b
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian BAverageConditional(Gaussian Product, Gaussian A, Gaussian B)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Product | Incoming message from |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | 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,a) p(product,a) factor(product,a,b)]/p(b)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
BAverageConditional(Double, Gaussian, Gaussian)
EP message to b
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian BAverageConditional(double Product, Gaussian A, Gaussian B)
Parameters
Type | Name | Description |
---|---|---|
Double | Product | Constant value for |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | 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_(a) p(a) factor(product,a,b)]/p(b)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Gaussian, Gaussian, Gaussian, Gaussian)
Evidence message for EP.
Declaration
[FactorMethod(typeof(Factor), "Product", new Type[]{typeof(double), typeof(double)})]
public static double LogAverageFactor(Gaussian Product, Gaussian A, Gaussian B, Gaussian to_product)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Product | Incoming message from |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Gaussian | to_product | Previous outgoing message to |
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))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(Gaussian, Gaussian, Gaussian, Gaussian)
Evidence message for EP.
Declaration
[FactorMethod(typeof(Factor), "Product", new Type[]{typeof(double), typeof(double)})]
public static double LogEvidenceRatio(Gaussian Product, Gaussian A, Gaussian B, Gaussian to_product)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Product | Incoming message from |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Gaussian | to_product | Previous outgoing message to |
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 |
|
ProductAverageConditional(Gaussian, Gaussian, Gaussian)
EP message to product
.
Declaration
[Quality(QualityBand.Experimental)]
public static Gaussian ProductAverageConditional(Gaussian Product, Gaussian A, Gaussian B)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Product | Incoming message from |
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
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 |
|
ImproperMessageException |
|
ProductAverageConditionalInit(Gaussian, Gaussian)
Declaration
public static Gaussian ProductAverageConditionalInit(Gaussian A, Gaussian B)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | A | Incoming message from |
Gaussian | B | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian |
Remarks