Class GammaRatioVmpOp
Provides outgoing messages for Ratio(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "Ratio", new Type[]{typeof(double), typeof(double)})]
[Quality(QualityBand.Preview)]
public static class GammaRatioVmpOp
Methods
AAverageLogarithm(Gamma, Gamma)
VMP message to a
.
Declaration
public static Gamma AAverageLogarithm(Gamma ratio, Gamma B)
Parameters
Type | Name | Description |
---|---|---|
Gamma | ratio | 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, ratio
is integrated out before taking the logarithm. The formula is exp(sum_(b) p(b) log(sum_ratio p(ratio) factor(ratio,a,b)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AAverageLogarithm(Gamma, Double)
VMP message to a
.
Declaration
public static Gamma AAverageLogarithm(Gamma ratio, double B)
Parameters
Type | Name | Description |
---|---|---|
Gamma | ratio | Incoming message from |
Double | B | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of a
with ratio
integrated out. The formula is sum_ratio p(ratio) factor(ratio,a,b)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AAverageLogarithm(Double, Gamma)
Declaration
[NotSupported("Variational Message Passing does not support a Ratio factor with fixed output.")]
public static Gamma AAverageLogarithm(double ratio, Gamma B)
Parameters
Type | Name | Description |
---|---|---|
Double | ratio | |
Gamma | B |
Returns
Type | Description |
---|---|
Gamma |
Remarks
Variational Message Passing does not support a Ratio factor with fixed output
AAverageLogarithm(Double, Double)
VMP message to a
.
Declaration
public static Gamma AAverageLogarithm(double ratio, double B)
Parameters
Type | Name | Description |
---|---|---|
Double | ratio | Constant value for |
Double | B | Constant value for |
Returns
Type | Description |
---|---|
Gamma | 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(Gamma)
Declaration
public static double AverageLogFactor(Gamma ratio)
Parameters
Type | Name | Description |
---|---|---|
Gamma | ratio |
Returns
Type | Description |
---|---|
Double |
AverageLogFactor(Double, Gamma, Double)
Declaration
public static double AverageLogFactor(double ratio, Gamma a, double b)
Parameters
Type | Name | Description |
---|---|---|
Double | ratio | |
Gamma | a | |
Double | b |
Returns
Type | Description |
---|---|
Double |
AverageLogFactor(Double, Double, Gamma)
Declaration
public static double AverageLogFactor(double ratio, double a, Gamma b)
Parameters
Type | Name | Description |
---|---|---|
Double | ratio | |
Double | a | |
Gamma | b |
Returns
Type | Description |
---|---|
Double |
BAverageLogarithm(Gamma, Gamma, Gamma)
VMP message to b
.
Declaration
public static Gamma BAverageLogarithm(Gamma ratio, Gamma A, Gamma B)
Parameters
Type | Name | Description |
---|---|---|
Gamma | ratio | 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, ratio
is integrated out before taking the logarithm. The formula is exp(sum_(a) p(a) log(sum_ratio p(ratio) factor(ratio,a,b)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ImproperMessageException |
|
BAverageLogarithm(Double, Gamma)
Declaration
[NotSupported("Variational Message Passing does not support a Ratio factor with fixed output.")]
public static Gamma BAverageLogarithm(double ratio, Gamma A)
Parameters
Type | Name | Description |
---|---|---|
Double | ratio | |
Gamma | A |
Returns
Type | Description |
---|---|
Gamma |
Remarks
Variational Message Passing does not support a Ratio factor with fixed output
RatioAverageLogarithm(Gamma, Gamma)
VMP message to ratio
.
Declaration
public static Gamma RatioAverageLogarithm(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 ratio
as the random arguments are varied. The formula is proj[sum_(a,b) p(a,b) factor(ratio,a,b)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
RatioAverageLogarithm(Gamma, Double)
VMP message to ratio
.
Declaration
public static Gamma RatioAverageLogarithm(Gamma A, double B)
Parameters
Type | Name | Description |
---|---|---|
Gamma | A | Incoming message from |
Double | B | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of ratio
as the random arguments are varied. The formula is proj[sum_(a) p(a) factor(ratio,a,b)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|