Class SumOp2
Provides outgoing messages for Sum(IList<Double>), 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(double[])}, Default = false)]
[Quality(QualityBand.Experimental)]
public static class SumOp2
Methods
ArrayAverageConditional(Gaussian, Gaussian, IList<Gaussian>, Int32)
EP message to array
.
Declaration
public static Gaussian ArrayAverageConditional(Gaussian sum, Gaussian to_sum, IList<Gaussian> array, int resultIndex)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sum | Incoming message from |
Gaussian | to_sum | Outgoing message to |
IList<Gaussian> | array | Incoming message from |
Int32 | resultIndex | Index of the |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
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 |
|
ImproperMessageException |
|
ArrayAverageConditional(Double, IList<Gaussian>, Int32)
EP message to array
.
Declaration
public static Gaussian ArrayAverageConditional(double sum, IList<Gaussian> array, int resultIndex)
Parameters
Type | Name | Description |
---|---|---|
Double | sum | Constant value for |
IList<Gaussian> | array | Incoming message from |
Int32 | resultIndex | Index of the |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of array
conditioned on the given values.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ArrayAverageLogarithm(Gaussian, Gaussian, IList<Gaussian>, Int32)
VMP message to array
.
Declaration
public static Gaussian ArrayAverageLogarithm(Gaussian sum, Gaussian to_sum, IList<Gaussian> array, int resultIndex)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sum | Incoming message from |
Gaussian | to_sum | Outgoing message to |
IList<Gaussian> | array | Incoming message from |
Int32 | resultIndex | Index of the |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
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 |
|