Class VectorGaussianOp_Laplace2
Provides outgoing messages for the following factors:
, given random arguments to the function.Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(VectorGaussian), "Sample", new Type[]{typeof(Vector), typeof(PositiveDefiniteMatrix)})]
[FactorMethod(new string[]{"sample", "mean", "precision"}, typeof(Factor), "VectorGaussian", new Type[]{})]
[Buffers(new string[]{"SampleMean", "SampleVariance", "MeanMean", "MeanVariance", "PrecisionMean", "PrecisionMeanLogDet"})]
[Quality(QualityBand.Preview)]
public static class VectorGaussianOp_Laplace2
Methods
LogAverageFactor(VectorGaussian, VectorGaussian, Wishart, Wishart)
Evidence message for EP.
Declaration
public static double LogAverageFactor(VectorGaussian sample, VectorGaussian mean, Wishart precision, Wishart to_precision)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
VectorGaussian | mean | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous 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,mean,precision) p(sample,mean,precision) factor(sample,mean,precision))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(Vector, VectorGaussian, Wishart, Wishart)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector sample, VectorGaussian mean, Wishart precision, Wishart to_precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
VectorGaussian | mean | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous 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_(mean,precision) p(mean,precision) factor(sample,mean,precision))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(VectorGaussian, VectorGaussian, Wishart, Wishart, VectorGaussian)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(VectorGaussian sample, VectorGaussian mean, Wishart precision, Wishart to_precision, VectorGaussian to_sample)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
VectorGaussian | mean | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous outgoing message to |
VectorGaussian | to_sample | Previous 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_(sample,mean,precision) p(sample,mean,precision) 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.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio(Vector, VectorGaussian, Wishart, Wishart)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Vector sample, VectorGaussian mean, Wishart precision, Wishart to_precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
VectorGaussian | mean | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous 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_(mean,precision) p(mean,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 |
|
MeanAverageConditional(VectorGaussian, Wishart, Wishart, VectorGaussian)
EP message to mean
.
Declaration
public static VectorGaussian MeanAverageConditional(VectorGaussian sample, Wishart precision, Wishart to_precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous outgoing message to |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
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,precision) p(sample,precision) factor(sample,mean,precision)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
PrecisionAverageConditional(VectorGaussian, VectorGaussian, Wishart, Wishart, Wishart)
EP message to precision
.
Declaration
public static Wishart PrecisionAverageConditional(VectorGaussian sample, VectorGaussian mean, Wishart precision, Wishart to_precision, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
VectorGaussian | mean | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous outgoing message to |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is a distribution matching the moments of precision
as the random arguments are varied. The formula is proj[p(precision) sum_(sample,mean) p(sample,mean) factor(sample,mean,precision)]/p(precision)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ImproperMessageException |
|
SampleAverageConditional(VectorGaussian, Wishart, Wishart, VectorGaussian)
EP message to sample
.
Declaration
public static VectorGaussian SampleAverageConditional(VectorGaussian mean, Wishart precision, Wishart to_precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | mean | Incoming message from |
Wishart | precision | Incoming message from |
Wishart | to_precision | Previous outgoing message to |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
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,precision) p(mean,precision) factor(sample,mean,precision)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|