Class InnerProductOp
Provides outgoing messages for InnerProduct(Vector, Vector), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Vector), "InnerProduct", new Type[]{}, Default = true)]
[Buffers(new string[]{"AVariance", "BVariance", "AMean", "BMean"})]
[Quality(QualityBand.Mature)]
public class InnerProductOp : InnerProductOpBase
Methods
AAverageConditional(Gaussian, VectorGaussian, VectorGaussian, VectorGaussian)
EP message to a
.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static VectorGaussian AAverageConditional(Gaussian innerProduct, VectorGaussian A, VectorGaussian B, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | innerProduct | Incoming message from |
VectorGaussian | A | Incoming message from |
VectorGaussian | B | Incoming message from |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
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_(innerProduct,b) p(innerProduct,b) factor(innerProduct,a,b)]/p(a)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
BAverageConditional(Gaussian, VectorGaussian, VectorGaussian, VectorGaussian)
EP message to b
.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static VectorGaussian BAverageConditional(Gaussian innerProduct, VectorGaussian A, VectorGaussian B, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | innerProduct | Incoming message from |
VectorGaussian | A | Incoming message from |
VectorGaussian | B | Incoming message from |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
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_(innerProduct,a) p(innerProduct,a) factor(innerProduct,a,b)]/p(b)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
InnerProductAverageConditional(VectorGaussian, VectorGaussian)
EP message to innerProduct
.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static Gaussian InnerProductAverageConditional(VectorGaussian A, VectorGaussian B)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | A | Incoming message from |
VectorGaussian | 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 innerProduct
as the random arguments are varied. The formula is proj[p(innerProduct) sum_(a,b) p(a,b) factor(innerProduct,a,b)]/p(innerProduct)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
LogAverageFactor(Gaussian, VectorGaussian, VectorGaussian)
Evidence message for EP.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static double LogAverageFactor(Gaussian innerProduct, VectorGaussian A, VectorGaussian B)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | innerProduct | Incoming message from |
VectorGaussian | A | Incoming message from |
VectorGaussian | B | Incoming message from |
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_(innerProduct,a,b) p(innerProduct,a,b) factor(innerProduct,a,b))
.
LogAverageFactor(Double, VectorGaussian, VectorGaussian)
Evidence message for EP.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static double LogAverageFactor(double innerProduct, VectorGaussian A, VectorGaussian B)
Parameters
Type | Name | Description |
---|---|---|
Double | innerProduct | Constant value for |
VectorGaussian | A | Incoming message from |
VectorGaussian | B | Incoming message from |
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_(a,b) p(a,b) factor(innerProduct,a,b))
.
LogEvidenceRatio(Gaussian, VectorGaussian, VectorGaussian)
Evidence message for EP.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static double LogEvidenceRatio(Gaussian innerProduct, VectorGaussian A, VectorGaussian B)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | innerProduct | Incoming message from |
VectorGaussian | A | Incoming message from |
VectorGaussian | 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_(innerProduct,a,b) p(innerProduct,a,b) factor(innerProduct,a,b) / sum_innerProduct p(innerProduct) messageTo(innerProduct))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, VectorGaussian, VectorGaussian)
Evidence message for EP.
Declaration
[NotSupported("An InnerProduct factor between two VectorGaussian variables is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static double LogEvidenceRatio(double innerProduct, VectorGaussian A, VectorGaussian B)
Parameters
Type | Name | Description |
---|---|---|
Double | innerProduct | Constant value for |
VectorGaussian | A | Incoming message from |
VectorGaussian | 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_(a,b) p(a,b) factor(innerProduct,a,b))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.