Class LogOp_EP
Provides outgoing messages for Log(Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Math), "Log", new Type[]{typeof(double)})]
[Quality(QualityBand.Preview)]
public class LogOp_EP
Methods
AverageLogFactor(Double, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double log, double d)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | log | Constant value for |
| Double | d | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Zero. |
Remarks
The formula for the result is log(factor(log,d)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
DAverageConditional(Gaussian, Gamma, Gaussian)
EP message to d.
Declaration
public static Gamma DAverageConditional(Gaussian log, Gamma d, Gaussian to_log)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | log | Incoming message from |
| Gamma | d | Incoming message from |
| Gaussian | to_log | Previous outgoing message to |
Returns
| Type | Description |
|---|---|
| Gamma | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of d as the random arguments are varied. The formula is proj[p(d) sum_(log) p(log) factor(log,d)]/p(d).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
DAverageConditional(Double)
EP message to d.
Declaration
public static Gamma DAverageConditional(double log)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | log | Constant value for |
Returns
| Type | Description |
|---|---|
| Gamma | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of d conditioned on the given values.
LogAverageConditional(Gaussian, Gamma, Gaussian)
EP message to log.
Declaration
public static Gaussian LogAverageConditional(Gaussian log, Gamma d, Gaussian result)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | log | Incoming message from |
| Gamma | d | Incoming message from |
| Gaussian | result | Modified to contain the outgoing message. |
Returns
| Type | Description |
|---|---|
| Gaussian |
|
Remarks
The outgoing message is a distribution matching the moments of log as the random arguments are varied. The formula is proj[p(log) sum_(d) p(d) factor(log,d)]/p(log).
Exceptions
| Type | Condition |
|---|---|
| ImproperMessageException |
|
| ImproperMessageException |
|
LogAverageConditional(Double)
EP message to log.
Declaration
public static Gaussian LogAverageConditional(double d)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | d | Constant value for |
Returns
| Type | Description |
|---|---|
| Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of log conditioned on the given values.
LogAverageConditionalInit()
Declaration
public static Gaussian LogAverageConditionalInit()
Returns
| Type | Description |
|---|---|
| Gaussian |
Remarks
LogAverageFactor(Gaussian, Gamma, Gaussian)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian log, Gamma d, Gaussian to_log)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | log | Incoming message from |
| Gamma | d | Incoming message from |
| Gaussian | to_log | Outgoing message to |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Remarks
The formula for the result is log(sum_(log,d) p(log,d) factor(log,d)).
LogAverageFactor(Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian log, double d)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | log | Incoming message from |
| Double | d | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Remarks
The formula for the result is log(sum_(log) p(log) factor(log,d)).
LogAverageFactor(Double, Gamma)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double log, Gamma d)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | log | Constant value for |
| Gamma | d | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's average value across the given argument distributions. |
Remarks
The formula for the result is log(sum_(d) p(d) factor(log,d)).
LogAverageFactor(Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double log, double d)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | log | Constant value for |
| Double | d | Constant value for |
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(log,d)).
LogEvidenceRatio(Gaussian, Gamma, Gaussian)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Gaussian log, Gamma d, Gaussian to_log)
Parameters
| Type | Name | Description |
|---|---|---|
| Gaussian | log | Incoming message from |
| Gamma | d | Incoming message from |
| Gaussian | to_log | Outgoing message to |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(sum_(log,d) p(log,d) factor(log,d) / sum_log p(log) messageTo(log)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Gamma)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double log, Gamma d)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | log | Constant value for |
| Gamma | d | Incoming message from |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(sum_(d) p(d) factor(log,d)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double log, double d)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | log | Constant value for |
| Double | d | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Logarithm of the factor's contribution the EP model evidence. |
Remarks
The formula for the result is log(factor(log,d)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.