Class ShiftAlphaToFactorOp
Provides outgoing messages for ToFactor<T>(T, Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(ShiftAlpha), "ToFactor<>", new Type[]{})]
[Quality(QualityBand.Experimental)]
public static class ShiftAlphaToFactorOp
Methods
FactorAverageConditional<T>(T, T, Double, Double, T)
EP message to factor.
Declaration
public static T FactorAverageConditional<T>(T factor, T variable, double variableAlpha, double factorAlpha, T result)
where T : SettableToPower<T>, SettableToProduct<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | factor | Incoming message from |
| T | variable | Incoming message from |
| Double | variableAlpha | Constant value for |
| Double | factorAlpha | Constant value for |
| T | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| T |
|
Type Parameters
| Name | Description |
|---|---|
| T | The type of the messages. |
Remarks
The outgoing message is a distribution matching the moments of factor as the random arguments are varied. The formula is proj[p(factor) sum_(variable) p(variable) factor(factor,variable,variableAlpha,factorAlpha)]/p(factor).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
LogEvidenceRatioOld<T>(T, T, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatioOld<T>(T factor, T variable, double variableAlpha, double factorAlpha)
where T : ICloneable, CanGetAverageLog<T>, SettableToPower<T>, SettableToProduct<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | factor | Incoming message from 'factor'. |
| T | variable | Incoming message from 'variable'. |
| Double | variableAlpha | Constant value for 'variableAlpha'. |
| Double | factorAlpha | Constant value for 'factorAlpha'. |
Returns
| Type | Description |
|---|---|
| Double |
|
Type Parameters
| Name | Description |
|---|---|
| T |
Remarks
The formula for the result is log(int f(x) qnotf(x) dx / int ftilde(x) qnotf(x) dx)
where x = (factor,variable,variableAlpha,factorAlpha).
VariableAverageConditional<T>(T, T)
EP message to variable.
Declaration
public static T VariableAverageConditional<T>(T factor, T result)
where T : SettableTo<T>
Parameters
| Type | Name | Description |
|---|---|---|
| T | factor | Incoming message from |
| T | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| T |
|
Type Parameters
| Name | Description |
|---|---|
| T | The type of the messages. |
Remarks
The outgoing message is a distribution matching the moments of variable as the random arguments are varied. The formula is proj[p(variable) sum_(factor) p(factor) factor(factor,variable,variableAlpha,factorAlpha)]/p(variable).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|