Class VariableOp
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 VariableOp
Methods
DefAverageConditional<T>(T)
EP message to def
.
Declaration
public static T DefAverageConditional<T>(T use)
Parameters
Type | Name | Description |
---|---|---|
T | use | Incoming message from |
Returns
Type | Description |
---|---|
T | The outgoing EP message to the |
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
The outgoing message is a distribution matching the moments of def
as the random arguments are varied. The formula is proj[p(def) sum_(use) p(use) factor(use,def,marginal)]/p(def)
.
LogEvidenceRatio<T>(T)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio<T>(T use)
Parameters
Type | Name | Description |
---|---|---|
T | use | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Type Parameters
Name | Description |
---|---|
T |
Remarks
The formula for the result is log(sum_(use) p(use) factor(use,def,marginal) / sum_use p(use) messageTo(use))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
MarginalAverageConditional<T>(T, T, T)
EP message to marginal
.
Declaration
[SkipIfAllUniform]
public static T MarginalAverageConditional<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 a distribution matching the moments of marginal
as the random arguments are varied. The formula is proj[p(marginal) sum_(use,def) p(use,def) factor(use,def,marginal)]/p(marginal)
.
MarginalAverageConditionalInit<T>(T)
Declaration
public static T MarginalAverageConditionalInit<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
UseAverageConditional<T>(T)
EP message to use
.
Declaration
public static T UseAverageConditional<T>(T Def)
Parameters
Type | Name | Description |
---|---|---|
T | Def | Incoming message from |
Returns
Type | Description |
---|---|
T | The outgoing EP message to the |
Type Parameters
Name | Description |
---|---|
T | The type of the marginal of the variable. |
Remarks
The outgoing message is a distribution matching the moments of use
as the random arguments are varied. The formula is proj[p(use) sum_(def) p(def) factor(use,def,marginal)]/p(use)
.