Class VariableVmpOp
Provides outgoing messages for the following factors:
, given random arguments to the function.Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Clone), "Variable<>", new Type[]{}, Default = true)]
[FactorMethod(typeof(Clone), "VariableInit<>", new Type[]{}, Default = true)]
[Quality(QualityBand.Preview)]
public static class VariableVmpOp
Methods
AverageLogFactor<T>(T)
Evidence message for VMP.
Declaration
public static double AverageLogFactor<T>(T to_marginal)
where T : CanGetAverageLog<T>
Parameters
Type | Name | Description |
---|---|---|
T | to_marginal | Previous outgoing message to |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
The formula for the result is log(factor(use,def,marginal))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
DefAverageLogarithm<T>(T, T)
VMP message to def
.
Declaration
public static T DefAverageLogarithm<T>(T to_marginal, T result)
where T : SettableTo<T>
Parameters
Type | Name | Description |
---|---|---|
T | to_marginal | Previous outgoing message to |
T | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
The outgoing message is the factor viewed as a function of def
conditioned on the given values.
MarginalAverageLogarithm<T>(T, T, T)
VMP message to marginal
.
Declaration
[SkipIfAllUniform]
public static T MarginalAverageLogarithm<T>(T use, T def, T result)
where T : SettableToProduct<T>, SettableTo<T>
Parameters
Type | Name | Description |
---|---|---|
T | use | Incoming message from |
T | def | Incoming message from |
T | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except marginal
. The formula is exp(sum_(use,def) p(use,def) log(factor(use,def,marginal)))
.
MarginalAverageLogarithmInit<T>(T)
Declaration
public static T MarginalAverageLogarithmInit<T>(T def)
where T : ICloneable
Parameters
Type | Name | Description |
---|---|---|
T | def | Incoming message from |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
UseAverageLogarithm<T>(T, T)
VMP message to use
.
Declaration
public static T UseAverageLogarithm<T>(T to_marginal, T result)
where T : SettableTo<T>
Parameters
Type | Name | Description |
---|---|---|
T | to_marginal | Previous outgoing message to |
T | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
T |
|
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
The outgoing message is the factor viewed as a function of use
conditioned on the given values.
UseAverageLogarithmInit<T>(T)
Declaration
public static T UseAverageLogarithmInit<T>(T def)
where T : ICloneable
Parameters
Type | Name | Description |
---|---|---|
T | def | Incoming message from |
Returns
Type | Description |
---|---|
T |
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks