Class PlusGammaVmpOp
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)}, Default = true)]
[Quality(QualityBand.Experimental)]
public static class PlusGammaVmpOp
Methods
AAverageLogarithm(Gamma, Gamma, Gamma)
VMP message to A
.
Declaration
public static Gamma AAverageLogarithm(Gamma sum, Gamma a, Gamma b)
Parameters
Type | Name | Description |
---|---|---|
Gamma | sum | Incoming message from |
Gamma | a | Incoming message from |
Gamma | b | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | 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 |
|
ImproperMessageException |
|
AAverageLogarithm(GammaPower, GammaPower, GammaPower, GammaPower, GammaPower)
Declaration
public static GammaPower AAverageLogarithm(GammaPower sum, GammaPower a, GammaPower b, GammaPower to_a, GammaPower to_b)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | sum | |
GammaPower | a | |
GammaPower | b | |
GammaPower | to_a | |
GammaPower | to_b |
Returns
Type | Description |
---|---|
GammaPower |
BAverageLogarithm(Gamma, Gamma, Gamma)
VMP message to B
.
Declaration
public static Gamma BAverageLogarithm(Gamma sum, Gamma a, Gamma b)
Parameters
Type | Name | Description |
---|---|---|
Gamma | sum | Incoming message from |
Gamma | a | Incoming message from |
Gamma | b | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | 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 |
|
ImproperMessageException |
|
BAverageLogarithm(GammaPower, GammaPower, GammaPower, GammaPower, GammaPower)
Declaration
public static GammaPower BAverageLogarithm(GammaPower sum, GammaPower a, GammaPower b, GammaPower to_a, GammaPower to_b)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | sum | |
GammaPower | a | |
GammaPower | b | |
GammaPower | to_a | |
GammaPower | to_b |
Returns
Type | Description |
---|---|
GammaPower |
InvGammaFromMeanAndMeanInverse(Double, Double)
Declaration
public static GammaPower InvGammaFromMeanAndMeanInverse(double mean, double meanInverse)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | |
Double | meanInverse |
Returns
Type | Description |
---|---|
GammaPower |
InvGammaFromShapeAndMeanInverse(Double, Double)
Declaration
public static GammaPower InvGammaFromShapeAndMeanInverse(double shape, double meanInverse)
Parameters
Type | Name | Description |
---|---|---|
Double | shape | |
Double | meanInverse |
Returns
Type | Description |
---|---|
GammaPower |
MeanInverseOfSum(GammaPower, GammaPower)
Declaration
public static double MeanInverseOfSum(GammaPower a, GammaPower b)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | a | |
GammaPower | b |
Returns
Type | Description |
---|---|
Double |
SumAverageLogarithm(Gamma, Gamma)
VMP message to Sum
.
Declaration
public static Gamma SumAverageLogarithm(Gamma a, Gamma b)
Parameters
Type | Name | Description |
---|---|---|
Gamma | a | Incoming message from |
Gamma | b | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | 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(GammaPower, GammaPower, GammaPower)
VMP message to Sum
.
Declaration
public static GammaPower SumAverageLogarithm(GammaPower a, GammaPower b, GammaPower result)
Parameters
Type | Name | Description |
---|---|---|
GammaPower | a | Incoming message from |
GammaPower | b | Incoming message from |
GammaPower | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
GammaPower |
|
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 |
|