Class InnerProductPartialCovarianceOp
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "InnerProduct", new Type[]{typeof(double[]), typeof(Vector)})]
[Buffers(new string[]{"MeanOfB", "CovarianceOfB"})]
[Quality(QualityBand.Preview)]
public static class InnerProductPartialCovarianceOp
Methods
AAverageLogarithm(Gaussian, DistributionStructArray<Gaussian, Double>, VectorGaussian, Vector, PositiveDefiniteMatrix, DistributionStructArray<Gaussian, Double>)
VMP message to A.
Declaration
public static DistributionStructArray<Gaussian, double> AAverageLogarithm(Gaussian X, DistributionStructArray<Gaussian, double> A, VectorGaussian B, Vector MeanOfB, PositiveDefiniteMatrix CovarianceOfB, DistributionStructArray<Gaussian, double> result)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | X | Incoming message from |
| DistributionStructArray<Gaussian, Double> | A | Incoming message from |
| VectorGaussian | B | Incoming message from |
| Vector | MeanOfB | Buffer |
| PositiveDefiniteMatrix | CovarianceOfB | Buffer |
| DistributionStructArray<Gaussian, Double> | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| DistributionStructArray<Gaussian, Double> |
|
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, X is integrated out before taking the logarithm. The formula is exp(sum_(B) p(B) log(sum_X p(X) factor(X,A,B))).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
AverageLogFactor()
Evidence message for VMP.
Declaration
public static double AverageLogFactor()
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Remarks
The formula for the result is log(factor(X,A,B)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
BAverageLogarithm(Gaussian, DistributionStructArray<Gaussian, Double>, VectorGaussian)
VMP message to B.
Declaration
public static VectorGaussian BAverageLogarithm(Gaussian X, [SkipIfAllUniform] DistributionStructArray<Gaussian, double> A, VectorGaussian result)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | X | Incoming message from |
| DistributionStructArray<Gaussian, Double> | A | Incoming message from |
| VectorGaussian | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| VectorGaussian |
|
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, X is integrated out before taking the logarithm. The formula is exp(sum_(A) p(A) log(sum_X p(X) factor(X,A,B))).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
BAverageLogarithm(Gaussian, Double[], VectorGaussian)
VMP message to B.
Declaration
public static VectorGaussian BAverageLogarithm(Gaussian X, [SkipIfAllUniform] double[] A, VectorGaussian result)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | X | Incoming message from |
| Double[] | A | Constant value for |
| VectorGaussian | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of B with X integrated out. The formula is sum_X p(X) factor(X,A,B).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
CovarianceOfB(VectorGaussian, PositiveDefiniteMatrix)
Update the buffer CovarianceOfB.
Declaration
public static PositiveDefiniteMatrix CovarianceOfB(VectorGaussian B, PositiveDefiniteMatrix result)
Parameters
| Type | Name | Description |
|---|---|---|
| VectorGaussian | B | Incoming message from |
| PositiveDefiniteMatrix | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| PositiveDefiniteMatrix |
|
Remarks
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
CovarianceOfBInit(VectorGaussian)
Initialize the buffer CovarianceOfB.
Declaration
public static PositiveDefiniteMatrix CovarianceOfBInit(VectorGaussian B)
Parameters
| Type | Name | Description |
|---|---|---|
| VectorGaussian | B | Incoming message from |
Returns
| Type | Description |
|---|---|
| PositiveDefiniteMatrix | Initial value of buffer |
Remarks
Eaat(DistributionStructArray<Gaussian, Double>, PositiveDefiniteMatrix)
Declaration
public static PositiveDefiniteMatrix Eaat(DistributionStructArray<Gaussian, double> A, PositiveDefiniteMatrix result)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray<Gaussian, Double> | A | Incoming message from |
| PositiveDefiniteMatrix | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| PositiveDefiniteMatrix |
|
Remarks
EaatInit(DistributionStructArray<Gaussian, Double>)
Declaration
public static PositiveDefiniteMatrix EaatInit(DistributionStructArray<Gaussian, double> A)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray<Gaussian, Double> | A | Incoming message from |
Returns
| Type | Description |
|---|---|
| PositiveDefiniteMatrix |
Remarks
Ebbt(PositiveDefiniteMatrix, Vector, PositiveDefiniteMatrix)
Declaration
public static PositiveDefiniteMatrix Ebbt(PositiveDefiniteMatrix CovarianceOfB, Vector MeanOfB, PositiveDefiniteMatrix result)
Parameters
| Type | Name | Description |
|---|---|---|
| PositiveDefiniteMatrix | CovarianceOfB | Buffer |
| Vector | MeanOfB | Buffer |
| PositiveDefiniteMatrix | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| PositiveDefiniteMatrix |
|
Remarks
EbbtInit(VectorGaussian)
Declaration
public static PositiveDefiniteMatrix EbbtInit(VectorGaussian B)
Parameters
| Type | Name | Description |
|---|---|---|
| VectorGaussian | B | Incoming message from |
Returns
| Type | Description |
|---|---|
| PositiveDefiniteMatrix |
Remarks
MeanOfB(VectorGaussian, PositiveDefiniteMatrix, Vector)
Update the buffer MeanOfB.
Declaration
public static Vector MeanOfB(VectorGaussian B, PositiveDefiniteMatrix CovarianceOfB, Vector result)
Parameters
| Type | Name | Description |
|---|---|---|
| VectorGaussian | B | Incoming message from |
| PositiveDefiniteMatrix | CovarianceOfB | Buffer |
| Vector | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| Vector |
|
Remarks
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
MeanOfBInit(VectorGaussian)
Initialize the buffer MeanOfB.
Declaration
public static Vector MeanOfBInit(VectorGaussian B)
Parameters
| Type | Name | Description |
|---|---|---|
| VectorGaussian | B | Incoming message from |
Returns
| Type | Description |
|---|---|
| Vector | Initial value of buffer |
Remarks
XAverageLogarithm(DistributionStructArray<Gaussian, Double>, VectorGaussian, Vector, PositiveDefiniteMatrix)
VMP message to X.
Declaration
public static Gaussian XAverageLogarithm([SkipIfAllUniform] DistributionStructArray<Gaussian, double> A, [SkipIfAllUniform] VectorGaussian B, Vector MeanOfB, PositiveDefiniteMatrix CovarianceOfB)
Parameters
| Type | Name | Description |
|---|---|---|
| DistributionStructArray<Gaussian, Double> | A | Incoming message from |
| VectorGaussian | B | Incoming message from |
| Vector | MeanOfB | Buffer |
| PositiveDefiniteMatrix | CovarianceOfB | Buffer |
Returns
| Type | Description |
|---|---|
| Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of X as the random arguments are varied. The formula is proj[sum_(A,B) p(A,B) factor(X,A,B)].
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
XAverageLogarithm(Double[], VectorGaussian, Vector, PositiveDefiniteMatrix)
VMP message to X.
Declaration
public static Gaussian XAverageLogarithm([SkipIfAllUniform] double[] A, [SkipIfAllUniform] VectorGaussian B, Vector MeanOfB, PositiveDefiniteMatrix CovarianceOfB)
Parameters
| Type | Name | Description |
|---|---|---|
| Double[] | A | Constant value for |
| VectorGaussian | B | Incoming message from |
| Vector | MeanOfB | Buffer |
| PositiveDefiniteMatrix | CovarianceOfB | Buffer |
Returns
| Type | Description |
|---|---|
| Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of X as the random arguments are varied. The formula is proj[sum_(B) p(B) factor(X,A,B)].
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
XAverageLogarithmInit()
Declaration
public static Gaussian XAverageLogarithmInit()
Returns
| Type | Description |
|---|---|
| Gaussian |
Remarks