Class DerivedVariableOp
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), "DerivedVariable<>", new Type[]{}, Default = true)]
[FactorMethod(typeof(Clone), "DerivedVariableInit<>", new Type[]{}, Default = true)]
[Quality(QualityBand.Preview)]
public static class DerivedVariableOp
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).
LogAverageFactor()
Evidence message for EP.
Declaration
public static double LogAverageFactor()
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Remarks
The formula for the result is log(factor(use,def,marginal)).
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>
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).
MarginalAverageConditional<TDist, T>(T, TDist)
Declaration
public static TDist MarginalAverageConditional<TDist, T>(T Def, TDist result)
where TDist : HasPoint<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | Def | |
| TDist | result |
Returns
| Type | Description |
|---|---|
| TDist |
Type Parameters
| Name | Description |
|---|---|
| TDist | The type of the marginal of the variable. |
| T | The type of the incoming message from |
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).
UseAverageConditional<TDist, T>(T, TDist)
Declaration
public static TDist UseAverageConditional<TDist, T>(T Def, TDist result)
where TDist : HasPoint<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | Def | |
| TDist | result |
Returns
| Type | Description |
|---|---|
| TDist |
Type Parameters
| Name | Description |
|---|---|
| TDist | The type of the marginal of the variable. |
| T | The type of the incoming message from |