Class GammaFromMeanAndVarianceOp
Provides outgoing messages for SampleFromMeanAndVariance(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(new string[]{"sample", "mean", "variance"}, typeof(Gamma), "SampleFromMeanAndVariance", new Type[]{})]
[Quality(QualityBand.Stable)]
public static class GammaFromMeanAndVarianceOp
Methods
AverageLogFactor(Double, Double, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sample, double mean, double variance)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | sample | Constant value for |
| Double | mean | Constant value for |
| Double | variance | Constant value for |
Returns
| Type | Description |
|---|---|
| Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is log(factor(sample,mean,variance)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
LogAverageFactor(Gamma, Gamma)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gamma sample, Gamma to_sample)
Parameters
| Type | Name | Description |
|---|---|---|
| Gamma | sample | Incoming message from |
| Gamma | to_sample | 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_(sample) p(sample) factor(sample,mean,variance)).
LogAverageFactor(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, double mean, double variance)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | sample | Constant value for |
| Double | mean | Constant value for |
| Double | variance | 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(sample,mean,variance)).
LogEvidenceRatio(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, double mean, double variance)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | sample | Constant value for |
| Double | mean | Constant value for |
| Double | variance | 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(sample,mean,variance)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.
SampleAverageConditional(Double, Double)
EP message to sample.
Declaration
public static Gamma SampleAverageConditional(double mean, double variance)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | mean | Constant value for |
| Double | variance | 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 sample conditioned on the given values.
SampleAverageLogarithm(Double, Double)
VMP message to sample.
Declaration
public static Gamma SampleAverageLogarithm(double mean, double variance)
Parameters
| Type | Name | Description |
|---|---|---|
| Double | mean | Constant value for |
| Double | variance | Constant value for |
Returns
| Type | Description |
|---|---|
| Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of sample conditioned on the given values.