Class MatrixMultiplyOp
Provides outgoing messages for MatrixMultiply(Double[,], Double[,]), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "MatrixMultiply", new Type[]{})]
[Quality(QualityBand.Stable)]
public static class MatrixMultiplyOp
Methods
AAverageConditional(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
EP message to A.
Declaration
[NotSupported("A MatrixMultiply factor between two Gaussian arrays is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static DistributionStructArray2D<Gaussian, double> AAverageConditional(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
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_(matrixMultiply,B) p(matrixMultiply,B) factor(matrixMultiply,A,B)]/p(A).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
AAverageConditional(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>)
EP message to A.
Declaration
public static DistributionStructArray2D<Gaussian, double> AAverageConditional(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, double[, ] B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| Double[,] | B | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
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_(matrixMultiply) p(matrixMultiply) factor(matrixMultiply,A,B)]/p(A).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
AAverageConditional(Double[,], Double[,], DistributionStructArray2D<Gaussian, Double>)
EP message to A.
Declaration
[NotSupported("A MatrixMultiply factor with fixed output is not yet implemented for Expectation Propagation.")]
public static DistributionStructArray2D<Gaussian, double> AAverageConditional(double[, ] matrixMultiply, double[, ] B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | B | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is the factor viewed as a function of A conditioned on the given values.
AAverageLogarithm(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
VMP message to A.
Declaration
public static DistributionStructArray2D<Gaussian, double> AAverageLogarithm(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> to_A)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | to_A | Previous outgoing message to |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> | 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 A. Because the factor is deterministic, matrixMultiply is integrated out before taking the logarithm. The formula is exp(sum_(B) p(B) log(sum_matrixMultiply p(matrixMultiply) factor(matrixMultiply,A,B))).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
AAverageLogarithm(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>)
VMP message to A.
Declaration
public static DistributionStructArray2D<Gaussian, double> AAverageLogarithm(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, double[, ] B, DistributionStructArray2D<Gaussian, double> to_A)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| Double[,] | B | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | to_A | Previous outgoing message to |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of A with matrixMultiply integrated out. The formula is sum_matrixMultiply p(matrixMultiply) factor(matrixMultiply,A,B).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
AAverageLogarithm(Double[,])
VMP message to A.
Declaration
[NotSupported("Variational Message Passing does not support a MatrixMultiply factor with fixed output.")]
public static DistributionStructArray2D<Gaussian, double> AAverageLogarithm(double[, ] matrixMultiply)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of A conditioned on the given values.
AverageLogFactor()
Evidence message for VMP.
Declaration
public static double AverageLogFactor()
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Remarks
The formula for the result is log(factor(matrixMultiply,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double[,], Double[,], Double[,])
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double[, ] matrixMultiply, double[, ] A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | A | Constant value for |
| Double[,] | B | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Remarks
The formula for the result is log(factor(matrixMultiply,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
BAverageConditional(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
EP message to B.
Declaration
[NotSupported("A MatrixMultiply factor between two Gaussian arrays is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static DistributionStructArray2D<Gaussian, double> BAverageConditional(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
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_(matrixMultiply,A) p(matrixMultiply,A) factor(matrixMultiply,A,B)]/p(B).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
BAverageConditional(DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
EP message to B.
Declaration
public static DistributionStructArray2D<Gaussian, double> BAverageConditional(DistributionStructArray2D<Gaussian, double> matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
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_(matrixMultiply) p(matrixMultiply) factor(matrixMultiply,A,B)]/p(B).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
BAverageConditional(Double[,], Double[,], DistributionStructArray2D<Gaussian, Double>)
EP message to B.
Declaration
[NotSupported("A MatrixMultiply factor with fixed output is not yet implemented for Expectation Propagation.")]
public static DistributionStructArray2D<Gaussian, double> BAverageConditional(double[, ] matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is the factor viewed as a function of B conditioned on the given values.
BAverageLogarithm(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
VMP message to B.
Declaration
public static DistributionStructArray2D<Gaussian, double> BAverageLogarithm(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> to_B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | to_B | Previous outgoing message to |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> | 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, matrixMultiply is integrated out before taking the logarithm. The formula is exp(sum_(A) p(A) log(sum_matrixMultiply p(matrixMultiply) factor(matrixMultiply,A,B))).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
| ImproperMessageException |
|
BAverageLogarithm(DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
VMP message to B.
Declaration
public static DistributionStructArray2D<Gaussian, double> BAverageLogarithm(DistributionStructArray2D<Gaussian, double> matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> to_B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | to_B | Previous outgoing message to |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of B with matrixMultiply integrated out. The formula is sum_matrixMultiply p(matrixMultiply) factor(matrixMultiply,A,B).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
BAverageLogarithm(Double[,])
VMP message to B.
Declaration
[NotSupported("Variational Message Passing does not support a MatrixMultiply factor with fixed output.")]
public static DistributionStructArray2D<Gaussian, double> BAverageLogarithm(double[, ] matrixMultiply)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of B conditioned on the given values.
LogAverageFactor(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, Double[,])
Evidence message for EP.
Declaration
public static double LogAverageFactor(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| Double[,] | B | Constant value for |
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_(matrixMultiply,A) p(matrixMultiply,A) factor(matrixMultiply,A,B)).
LogAverageFactor(DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>)
Evidence message for EP.
Declaration
public static double LogAverageFactor(DistributionStructArray2D<Gaussian, double> matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | 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_(matrixMultiply,B) p(matrixMultiply,B) factor(matrixMultiply,A,B)).
LogAverageFactor(Double[,], DistributionStructArray2D<Gaussian, Double>, Double[,])
Evidence message for EP.
Declaration
public static double LogAverageFactor(double[, ] matrixMultiply, DistributionStructArray2D<Gaussian, double> A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| Double[,] | B | Constant value for |
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) p(A) factor(matrixMultiply,A,B)).
LogAverageFactor(Double[,], Double[,], DistributionStructArray2D<Gaussian, Double>)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double[, ] matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | 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_(B) p(B) factor(matrixMultiply,A,B)).
LogAverageFactor(Double[,], Double[,], Double[,])
Evidence message for EP.
Declaration
public static double LogAverageFactor(double[, ] matrixMultiply, double[, ] A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | A | Constant value for |
| Double[,] | B | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Remarks
The formula for the result is log(factor(matrixMultiply,A,B)).
LogEvidenceRatio(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, Double[,])
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(DistributionStructArray2D<Gaussian, double> matrixMultiply, DistributionStructArray2D<Gaussian, double> A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | 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_(matrixMultiply,A) p(matrixMultiply,A) factor(matrixMultiply,A,B) / sum_matrixMultiply p(matrixMultiply) messageTo(matrixMultiply)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(DistributionStructArray2D<Gaussian, double> matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | matrixMultiply | Incoming message from |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | 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_(matrixMultiply,B) p(matrixMultiply,B) factor(matrixMultiply,A,B) / sum_matrixMultiply p(matrixMultiply) messageTo(matrixMultiply)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double[,], DistributionStructArray2D<Gaussian, Double>, Double[,])
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double[, ] matrixMultiply, DistributionStructArray2D<Gaussian, double> A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | 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(matrixMultiply,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double[,], Double[,], DistributionStructArray2D<Gaussian, Double>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double[, ] matrixMultiply, double[, ] A, DistributionStructArray2D<Gaussian, double> B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | 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_(B) p(B) factor(matrixMultiply,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double[,], Double[,], Double[,])
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double[, ] matrixMultiply, double[, ] A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | matrixMultiply | Constant value for |
| Double[,] | A | Constant value for |
| 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(factor(matrixMultiply,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
MatrixMultiplyAverageConditional(DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
EP message to matrixMultiply.
Declaration
[NotSupported("A MatrixMultiply factor between two Gaussian arrays is not yet implemented for Expectation Propagation. Try using Variational Message Passing.")]
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageConditional(DistributionStructArray2D<Gaussian, double> A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is a distribution matching the moments of matrixMultiply as the random arguments are varied. The formula is proj[p(matrixMultiply) sum_(A,B) p(A,B) factor(matrixMultiply,A,B)]/p(matrixMultiply).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
MatrixMultiplyAverageConditional(DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>)
EP message to matrixMultiply.
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageConditional(DistributionStructArray2D<Gaussian, double> A, double[, ] B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| Double[,] | B | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is a distribution matching the moments of matrixMultiply as the random arguments are varied. The formula is proj[p(matrixMultiply) sum_(A) p(A) factor(matrixMultiply,A,B)]/p(matrixMultiply).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
MatrixMultiplyAverageConditional(Double[,], DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
EP message to matrixMultiply.
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageConditional(double[, ] A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is a distribution matching the moments of matrixMultiply as the random arguments are varied. The formula is proj[p(matrixMultiply) sum_(B) p(B) factor(matrixMultiply,A,B)]/p(matrixMultiply).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
MatrixMultiplyAverageLogarithm(DistributionArray2D<Gaussian>, DistributionArray2D<Gaussian>, DistributionStructArray2D<Gaussian, Double>)
VMP message to matrixMultiply.
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageLogarithm(DistributionArray2D<Gaussian> A, DistributionArray2D<Gaussian> B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionArray2D<Gaussian> | A | Incoming message from |
| DistributionArray2D<Gaussian> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is a distribution matching the moments of matrixMultiply as the random arguments are varied. The formula is proj[sum_(A,B) p(A,B) factor(matrixMultiply,A,B)].
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
MatrixMultiplyAverageLogarithm(DistributionStructArray2D<Gaussian, Double>, Double[,], DistributionStructArray2D<Gaussian, Double>)
VMP message to matrixMultiply.
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageLogarithm(DistributionStructArray2D<Gaussian, double> A, double[, ] B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray2D<Gaussian, Double> | A | Incoming message from |
| Double[,] | B | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is a distribution matching the moments of matrixMultiply as the random arguments are varied. The formula is proj[sum_(A) p(A) factor(matrixMultiply,A,B)].
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
MatrixMultiplyAverageLogarithm(Double[,], DistributionStructArray2D<Gaussian, Double>, DistributionStructArray2D<Gaussian, Double>)
VMP message to matrixMultiply.
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageLogarithm(double[, ] A, DistributionStructArray2D<Gaussian, double> B, DistributionStructArray2D<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | A | Constant value for |
| DistributionStructArray2D<Gaussian, Double> | B | Incoming message from |
| DistributionStructArray2D<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
|
Remarks
The outgoing message is a distribution matching the moments of matrixMultiply as the random arguments are varied. The formula is proj[sum_(B) p(B) factor(matrixMultiply,A,B)].
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
MatrixMultiplyAverageLogarithmInit(DistributionArray2D<Gaussian>, DistributionArray2D<Gaussian>)
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageLogarithmInit(DistributionArray2D<Gaussian> A, DistributionArray2D<Gaussian> B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionArray2D<Gaussian> | A | Incoming message from |
| DistributionArray2D<Gaussian> | B | Incoming message from |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
Remarks
MatrixMultiplyAverageLogarithmInit(DistributionArray2D<Gaussian>, Double[,])
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageLogarithmInit(DistributionArray2D<Gaussian> A, double[, ] B)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionArray2D<Gaussian> | A | Incoming message from |
| Double[,] | B | Constant value for |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
Remarks
MatrixMultiplyAverageLogarithmInit(Double[,], DistributionArray2D<Gaussian>)
Declaration
public static DistributionStructArray2D<Gaussian, double> MatrixMultiplyAverageLogarithmInit(double[, ] A, DistributionArray2D<Gaussian> B)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[,] | A | Constant value for |
| DistributionArray2D<Gaussian> | B | Incoming message from |
Returns
| Type | Description |
|---|---|
| DistributionStructArray2D<Gaussian, Double> |
Remarks