Class SumVectorGaussianOp
Provides outgoing messages for Sum(IList<Vector>), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "Sum", new Type[]{typeof(Vector[])})]
[Quality(QualityBand.Stable)]
public static class SumVectorGaussianOp
Methods
ArrayAverageConditional(VectorGaussian, VectorGaussian, VectorGaussian[], VectorGaussian[])
EP message to array
.
Declaration
public static VectorGaussian[] ArrayAverageConditional(VectorGaussian sum, VectorGaussian to_sum, VectorGaussian[] array, VectorGaussian[] result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sum | Incoming message from |
VectorGaussian | to_sum | Outgoing message to |
VectorGaussian[] | array | 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 array
as the random arguments are varied. The formula is proj[p(array) sum_(sum) p(sum) factor(sum,array)]/p(array)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ArrayAverageConditional<TVectorGaussianList>(VectorGaussian, VectorGaussian, IList<VectorGaussian>, TVectorGaussianList)
EP message to array
.
Declaration
public static TVectorGaussianList ArrayAverageConditional<TVectorGaussianList>(VectorGaussian sum, VectorGaussian to_sum, IList<VectorGaussian> array, TVectorGaussianList result)
where TVectorGaussianList : IList<VectorGaussian>, SettableToUniform
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sum | Incoming message from |
VectorGaussian | to_sum | Outgoing message to |
IList<VectorGaussian> | array | Incoming message from |
TVectorGaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TVectorGaussianList |
|
Type Parameters
Name | Description |
---|---|
TVectorGaussianList |
Remarks
The outgoing message is a distribution matching the moments of array
as the random arguments are varied. The formula is proj[p(array) sum_(sum) p(sum) factor(sum,array)]/p(array)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ArrayAverageConditional<TVectorGaussianList>(Vector, IList<VectorGaussian>, TVectorGaussianList)
EP message to array
.
Declaration
public static TVectorGaussianList ArrayAverageConditional<TVectorGaussianList>(Vector sum, IList<VectorGaussian> array, TVectorGaussianList result)
where TVectorGaussianList : IList<VectorGaussian>, SettableToUniform
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<VectorGaussian> | array | Incoming message from |
TVectorGaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TVectorGaussianList |
|
Type Parameters
Name | Description |
---|---|
TVectorGaussianList | A list of VectorGaussian distributions which may be set to uniform. |
Remarks
The outgoing message is the factor viewed as a function of array
conditioned on the given values.
ArrayAverageLogarithm<TVectorGaussianList>(VectorGaussian, IList<VectorGaussian>, TVectorGaussianList)
VMP message to array
.
Declaration
public static TVectorGaussianList ArrayAverageLogarithm<TVectorGaussianList>(VectorGaussian sum, IList<VectorGaussian> array, TVectorGaussianList to_array)
where TVectorGaussianList : IList<VectorGaussian>
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sum | Incoming message from |
IList<VectorGaussian> | array | Incoming message from |
TVectorGaussianList | to_array | Previous outgoing message to |
Returns
Type | Description |
---|---|
TVectorGaussianList | The outgoing VMP message to the |
Type Parameters
Name | Description |
---|---|
TVectorGaussianList | A list of VectorGaussian distributions. |
Remarks
The outgoing message is the factor viewed as a function of array
with sum
integrated out. The formula is sum_sum p(sum) factor(sum,array)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ArrayAverageLogarithm<TVectorGaussianList>(Vector, IList<VectorGaussian>, TVectorGaussianList)
VMP message to array
.
Declaration
public static TVectorGaussianList ArrayAverageLogarithm<TVectorGaussianList>(Vector sum, IList<VectorGaussian> array, TVectorGaussianList result)
where TVectorGaussianList : IList<VectorGaussian>
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<VectorGaussian> | array | Incoming message from |
TVectorGaussianList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
TVectorGaussianList |
|
Type Parameters
Name | Description |
---|---|
TVectorGaussianList | A list of VectorGaussian distributions. |
Remarks
The outgoing message is the factor viewed as a function of array
conditioned on the given values.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ArrayAverageLogarithm1<TVectorGaussianList>(VectorGaussian, IList<VectorGaussian>, TVectorGaussianList)
Declaration
public static TVectorGaussianList ArrayAverageLogarithm1<TVectorGaussianList>(VectorGaussian sum, IList<VectorGaussian> array, TVectorGaussianList to_array)
where TVectorGaussianList : IList<VectorGaussian>
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sum | Incoming message from |
IList<VectorGaussian> | array | Incoming message from |
TVectorGaussianList | to_array | Previous outgoing message to |
Returns
Type | Description |
---|---|
TVectorGaussianList |
Type Parameters
Name | Description |
---|---|
TVectorGaussianList | A list of VectorGaussian distributions. |
Remarks
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(sum,array))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Vector, IList<Vector>)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Vector sum, IList<Vector> array)
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<Vector> | array | Constant value for |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
The formula for the result is log(factor(sum,array))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
LogAverageFactor(VectorGaussian, VectorGaussian)
Evidence message for EP.
Declaration
public static double LogAverageFactor(VectorGaussian sum, VectorGaussian to_sum)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sum | Incoming message from |
VectorGaussian | to_sum | 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_(sum) p(sum) factor(sum,array))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Vector, IList<VectorGaussian>)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector sum, IList<VectorGaussian> array)
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<VectorGaussian> | array | 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_(array) p(array) factor(sum,array))
.
LogAverageFactor(Vector, IList<Vector>)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector sum, IList<Vector> array)
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<Vector> | array | 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(sum,array))
.
LogEvidenceRatio(VectorGaussian)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(VectorGaussian sum)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sum | 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_(sum) p(sum) factor(sum,array) / sum_sum p(sum) messageTo(sum))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Vector, IList<VectorGaussian>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Vector sum, IList<VectorGaussian> array)
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<VectorGaussian> | array | 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_(array) p(array) factor(sum,array))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Vector, IList<Vector>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Vector sum, IList<Vector> array)
Parameters
Type | Name | Description |
---|---|---|
Vector | sum | Constant value for |
IList<Vector> | array | 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(sum,array))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
SumAverageConditional(IList<VectorGaussian>, VectorGaussian)
EP message to sum
.
Declaration
public static VectorGaussian SumAverageConditional(IList<VectorGaussian> array, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
IList<VectorGaussian> | array | 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 sum
as the random arguments are varied. The formula is proj[p(sum) sum_(array) p(array) factor(sum,array)]/p(sum)
.
SumAverageLogarithm(IList<VectorGaussian>, VectorGaussian)
VMP message to sum
.
Declaration
public static VectorGaussian SumAverageLogarithm(IList<VectorGaussian> array, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
IList<VectorGaussian> | array | 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 sum
as the random arguments are varied. The formula is proj[sum_(array) p(array) factor(sum,array)]
.