Class ShiftAlphaFromFactorOp
Provides outgoing messages for FromFactor<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), "FromFactor<>", new Type[]{})]
[Quality(QualityBand.Experimental)]
public static class ShiftAlphaFromFactorOp
Methods
FactorAverageConditional<T>(T, T, Double, Double, T)
EP message to factor
.
Declaration
public static T FactorAverageConditional<T>(T factor, T variable, double factorAlpha, double variableAlpha, T result)
where T : SettableToPower<T>, SettableToProduct<T>
Parameters
Type | Name | Description |
---|---|---|
T | factor | Incoming message from |
T | variable | Incoming message from |
Double | factorAlpha | Constant value for |
Double | variableAlpha | 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(variable,factor,factorAlpha,variableAlpha)]/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 = (variable,factor,factorAlpha,variableAlpha)
.
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(variable,factor,factorAlpha,variableAlpha)]/p(variable)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|