Class GaussianOpBase
Provides outgoing messages for the following factors:
, given random arguments to the function.Inheritance
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
public class GaussianOpBase
Methods
LogAverageFactor(Gaussian, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian sample, Gaussian mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Double | precision | 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_(sample,mean) p(sample,mean) factor(sample,mean,precision))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
LogAverageFactor(Gaussian, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Gaussian sample, double mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Double | precision | 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_(sample) p(sample) factor(sample,mean,precision))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Double, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, Gaussian mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Double | precision | 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_(mean) p(mean) factor(sample,mean,precision))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Double, Double, Gamma)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, double mean, Gamma precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Gamma | precision | 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_(precision) p(precision) factor(sample,mean,precision))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, double mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Double | precision | 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,precision))
.
LogEvidenceRatio(Gaussian, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Gaussian sample, Gaussian mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Gaussian | mean | Incoming message from |
Double | precision | 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(sum_(sample,mean) p(sample,mean) factor(sample,mean,precision) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Gaussian, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Gaussian sample, double mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | mean | Constant value for |
Double | precision | 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(sum_(sample) p(sample) factor(sample,mean,precision) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Gaussian, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, Gaussian mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gaussian | mean | Incoming message from |
Double | precision | 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(sum_(mean) p(mean) factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(Double, Double, Gamma)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, double mean, Gamma precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Gamma | precision | 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_(precision) p(precision) factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, double mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | Constant value for |
Double | precision | 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,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
MeanAverageConditional(Gaussian, Double)
EP message to mean
.
Declaration
public static Gaussian MeanAverageConditional(Gaussian sample, double precision)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | sample | Incoming message from |
Double | precision | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of mean
as the random arguments are varied. The formula is proj[p(mean) sum_(sample) p(sample) factor(sample,mean,precision)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageConditional(Double, Double)
EP message to mean
.
Declaration
public static Gaussian MeanAverageConditional(double sample, double precision)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | precision | 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 mean
conditioned on the given values.
PrecisionAverageConditional(Double, Double)
EP message to precision
.
Declaration
public static Gamma PrecisionAverageConditional(double sample, double mean)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | mean | 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 precision
conditioned on the given values.
SampleAverageConditional(Gaussian, Double)
EP message to sample
.
Declaration
public static Gaussian SampleAverageConditional(Gaussian mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Gaussian | mean | Incoming message from |
Double | precision | Constant value for |
Returns
Type | Description |
---|---|
Gaussian | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of sample
as the random arguments are varied. The formula is proj[p(sample) sum_(mean) p(mean) factor(sample,mean,precision)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional(Double, Double)
EP message to sample
.
Declaration
public static Gaussian SampleAverageConditional(double mean, double precision)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Double | precision | 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 sample
conditioned on the given values.
TPdfLn(Double, Double, Double)
Logarithm of Student T density.
Declaration
public static double TPdfLn(double x, double v, double n)
Parameters
Type | Name | Description |
---|---|---|
Double | x | sample |
Double | v | variance parameter |
Double | n | degrees of freedom plus 1 |
Returns
Type | Description |
---|---|
Double |