Class DoublePlusVmpOp
Provides outgoing messages for Plus(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "Plus", new Type[]{typeof(double), typeof(double)})]
[Quality(QualityBand.Stable)]
public static class DoublePlusVmpOp
Methods
AAverageLogarithm(Gaussian, Gaussian)
VMP message to A
.
Declaration
public static Gaussian AAverageLogarithm(Gaussian Sum, Gaussian b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Sum | Incoming message from |
Gaussian | b | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | 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, Sum
is integrated out before taking the logarithm. The formula is exp(sum_(B) p(B) log(sum_Sum p(Sum) factor(Sum,A,B)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AAverageLogarithm(Gaussian, Gaussian, Gaussian, Gaussian, Gaussian, Gaussian, Gaussian)
VMP message to A
.
Declaration
public static Gaussian AAverageLogarithm(Gaussian Sum, Gaussian a, Gaussian a_deriv, Gaussian to_a, Gaussian b, Gaussian b_deriv, Gaussian to_b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Sum | Incoming message from |
Gaussian | a | Incoming message from |
Gaussian | a_deriv | |
Gaussian | to_a | Previous outgoing message to |
Gaussian | b | Incoming message from |
Gaussian | b_deriv | |
Gaussian | to_b | Previous outgoing message to |
Returns
Type | Description |
---|---|
Gaussian | 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, Sum
is integrated out before taking the logarithm. The formula is exp(sum_(B) p(B) log(sum_Sum p(Sum) factor(Sum,A,B)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AAverageLogarithm(Gaussian, Double)
VMP message to A
.
Declaration
public static Gaussian AAverageLogarithm(Gaussian Sum, double b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Sum | Incoming message from |
Double | b | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of A
with Sum
integrated out. The formula is sum_Sum p(Sum) factor(Sum,A,B)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AAverageLogarithm(Double, Gaussian)
VMP message to A
.
Declaration
[NotSupported("Variational Message Passing does not support a Plus factor with fixed output and two random inputs.")]
public static Gaussian AAverageLogarithm(double Sum, Gaussian b)
Parameters
Type | Name | Description |
---|---|---|
Double | Sum | Constant value for |
Gaussian | b | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | 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
. The formula is exp(sum_(B) p(B) log(factor(Sum,A,B)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AAverageLogarithm(Double, Double)
VMP message to A
.
Declaration
public static Gaussian AAverageLogarithm(double Sum, double b)
Parameters
Type | Name | Description |
---|---|---|
Double | Sum | Constant value for |
Double | b | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | 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(Gaussian)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Gaussian sum)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sum | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double, Gaussian)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sum, Gaussian a)
Parameters
Type | Name | Description |
---|---|---|
Double | sum | Constant value for |
Gaussian | a | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double, Double, Gaussian)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sum, double a, Gaussian b)
Parameters
Type | Name | Description |
---|---|---|
Double | sum | Constant value for |
Double | a | Constant value for |
Gaussian | b | Incoming message from |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
In Variational Message Passing, the evidence contribution of a deterministic factor is zero. 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 sum, double a, double b)
Parameters
Type | Name | Description |
---|---|---|
Double | sum | 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(Sum,A,B))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
BAverageLogarithm(Gaussian, Gaussian)
VMP message to B
.
Declaration
public static Gaussian BAverageLogarithm(Gaussian Sum, Gaussian a)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Sum | Incoming message from |
Gaussian | a | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | 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, Sum
is integrated out before taking the logarithm. The formula is exp(sum_(A) p(A) log(sum_Sum p(Sum) factor(Sum,A,B)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
BAverageLogarithm(Gaussian, Double)
VMP message to B
.
Declaration
public static Gaussian BAverageLogarithm(Gaussian Sum, double a)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Sum | Incoming message from |
Double | a | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of B
with Sum
integrated out. The formula is sum_Sum p(Sum) factor(Sum,A,B)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
BAverageLogarithm(Double, Gaussian)
VMP message to B
.
Declaration
[NotSupported("Variational Message Passing does not support a Plus factor with fixed output and two random inputs.")]
public static Gaussian BAverageLogarithm(double Sum, Gaussian a)
Parameters
Type | Name | Description |
---|---|---|
Double | Sum | Constant value for |
Gaussian | a | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | 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
. The formula is exp(sum_(A) p(A) log(factor(Sum,A,B)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
BAverageLogarithm(Double, Double)
VMP message to B
.
Declaration
public static Gaussian BAverageLogarithm(double Sum, double a)
Parameters
Type | Name | Description |
---|---|---|
Double | Sum | Constant value for |
Double | a | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of B
conditioned on the given values.
SumAverageLogarithm(Gaussian, Gaussian)
VMP message to Sum
.
Declaration
public static Gaussian SumAverageLogarithm(Gaussian a, Gaussian b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | a | Incoming message from |
Gaussian | b | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of Sum
as the random arguments are varied. The formula is proj[sum_(A,B) p(A,B) factor(Sum,A,B)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
SumAverageLogarithm(Gaussian, Double)
VMP message to Sum
.
Declaration
public static Gaussian SumAverageLogarithm(Gaussian a, double b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | a | Incoming message from |
Double | b | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of Sum
as the random arguments are varied. The formula is proj[sum_(A) p(A) factor(Sum,A,B)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SumAverageLogarithm(Double, Gaussian)
VMP message to Sum
.
Declaration
public static Gaussian SumAverageLogarithm(double a, Gaussian b)
Parameters
Type | Name | Description |
---|---|---|
Double | a | Constant value for |
Gaussian | b | Incoming message from |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of Sum
as the random arguments are varied. The formula is proj[sum_(B) p(B) factor(Sum,A,B)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SumAverageLogarithm(Double, Double)
VMP message to Sum
.
Declaration
public static Gaussian SumAverageLogarithm(double a, double b)
Parameters
Type | Name | Description |
---|---|---|
Double | a | Constant value for |
Double | b | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of Sum
conditioned on the given values.
SumDeriv(Gaussian, Gaussian, Gaussian, Gaussian, Gaussian, Gaussian, Gaussian)
Declaration
public static Gaussian SumDeriv(Gaussian Sum, Gaussian a, Gaussian a_deriv, Gaussian to_a, Gaussian b, Gaussian b_deriv, Gaussian to_b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | Sum | |
Gaussian | a | |
Gaussian | a_deriv | |
Gaussian | to_a | |
Gaussian | b | |
Gaussian | b_deriv | |
Gaussian | to_b |
Returns
Type | Description |
---|---|
Gaussian |
SumDeriv(Gaussian, Double)
Declaration
public static Gaussian SumDeriv(Gaussian a, double b)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | a | |
Double | b |
Returns
Type | Description |
---|---|
Gaussian |
SumDeriv(Double, Gaussian)
Declaration
public static Gaussian SumDeriv(double a, Gaussian b)
Parameters
Type | Name | Description |
---|---|---|
Double | a | |
Gaussian | b |
Returns
Type | Description |
---|---|
Gaussian |