Class VectorGaussianOp
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.Stable)]
public static class VectorGaussianOp
Methods
AverageLogFactor(VectorGaussian, Vector, PositiveDefiniteMatrix, VectorGaussian, Vector, PositiveDefiniteMatrix, Wishart, PositiveDefiniteMatrix, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(VectorGaussian sample, Vector SampleMean, PositiveDefiniteMatrix SampleVariance, VectorGaussian mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, Wishart precision, PositiveDefiniteMatrix precisionMean, double precisionMeanLogDet)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
VectorGaussian | mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
Wishart | precision | Incoming message from |
PositiveDefiniteMatrix | precisionMean | Buffer |
Double | precisionMeanLogDet | Buffer |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(sample,mean,precision) p(sample,mean,precision) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ImproperMessageException |
|
AverageLogFactor(VectorGaussian, Vector, PositiveDefiniteMatrix, VectorGaussian, Vector, PositiveDefiniteMatrix, PositiveDefiniteMatrix)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(VectorGaussian sample, Vector SampleMean, PositiveDefiniteMatrix SampleVariance, VectorGaussian mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
VectorGaussian | mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
PositiveDefiniteMatrix | precision | 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 sum_(sample,mean) p(sample,mean) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AverageLogFactor(VectorGaussian, Vector, PositiveDefiniteMatrix, Vector, Wishart, PositiveDefiniteMatrix, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(VectorGaussian sample, Vector SampleMean, PositiveDefiniteMatrix SampleVariance, Vector mean, Wishart precision, PositiveDefiniteMatrix precisionMean, double precisionMeanLogDet)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
Vector | mean | Constant value for |
Wishart | precision | Incoming message from |
PositiveDefiniteMatrix | precisionMean | Buffer |
Double | precisionMeanLogDet | Buffer |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(sample,precision) p(sample,precision) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AverageLogFactor(VectorGaussian, Vector, PositiveDefiniteMatrix, Vector, PositiveDefiniteMatrix)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(VectorGaussian sample, Vector SampleMean, PositiveDefiniteMatrix SampleVariance, Vector mean, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
Vector | mean | Constant value for |
PositiveDefiniteMatrix | precision | 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 sum_(sample) p(sample) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(Vector, VectorGaussian, Vector, PositiveDefiniteMatrix, Wishart, PositiveDefiniteMatrix, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Vector sample, VectorGaussian mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, Wishart precision, PositiveDefiniteMatrix precisionMean, double precisionMeanLogDet)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
VectorGaussian | mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
Wishart | precision | Incoming message from |
PositiveDefiniteMatrix | precisionMean | Buffer |
Double | precisionMeanLogDet | Buffer |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(mean,precision) p(mean,precision) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
AverageLogFactor(Vector, VectorGaussian, Vector, PositiveDefiniteMatrix, PositiveDefiniteMatrix)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Vector sample, VectorGaussian mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
VectorGaussian | mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
PositiveDefiniteMatrix | precision | 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 sum_(mean) p(mean) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(Vector, Vector, Wishart, PositiveDefiniteMatrix, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Vector sample, Vector mean, Wishart precision, PositiveDefiniteMatrix precisionMean, double precisionMeanLogDet)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | mean | Constant value for |
Wishart | precision | Incoming message from |
PositiveDefiniteMatrix | precisionMean | Buffer |
Double | precisionMeanLogDet | Buffer |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(precision) p(precision) log(factor(sample,mean,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(Vector, Vector, PositiveDefiniteMatrix)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Vector sample, Vector mean, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | mean | Constant value for |
PositiveDefiniteMatrix | precision | 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,precision))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
LogAverageFactor(Vector, PositiveDefiniteMatrix, Vector, PositiveDefiniteMatrix, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector SampleMean, PositiveDefiniteMatrix SampleVariance, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, PositiveDefiniteMatrix Precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
PositiveDefiniteMatrix | 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))
.
LogAverageFactor(Vector, Vector, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector sample, Vector mean, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | mean | Constant value for |
PositiveDefiniteMatrix | 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))
.
LogAverageFactor(Vector, Vector, PositiveDefiniteMatrix, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Vector Sample, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, PositiveDefiniteMatrix Precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
PositiveDefiniteMatrix | 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(VectorGaussian, VectorGaussian, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(VectorGaussian sample, VectorGaussian mean, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
VectorGaussian | mean | Incoming message from |
PositiveDefiniteMatrix | 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.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
LogEvidenceRatio(VectorGaussian, Vector, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(VectorGaussian sample, Vector mean, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | sample | Incoming message from |
Vector | mean | Constant value for |
PositiveDefiniteMatrix | 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(Vector, VectorGaussian, Vector, PositiveDefiniteMatrix, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Vector sample, VectorGaussian mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
VectorGaussian | mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
PositiveDefiniteMatrix | 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.
LogEvidenceRatio(Vector, Vector, PositiveDefiniteMatrix)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Vector sample, Vector mean, PositiveDefiniteMatrix precision)
Parameters
Type | Name | Description |
---|---|---|
Vector | sample | Constant value for |
Vector | mean | Constant value for |
PositiveDefiniteMatrix | 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(VectorGaussian, PositiveDefiniteMatrix, VectorGaussian)
EP message to mean
.
Declaration
public static VectorGaussian MeanAverageConditional(VectorGaussian Sample, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
PositiveDefiniteMatrix | Precision | Constant value for |
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) p(sample) factor(sample,mean,precision)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageConditional(Vector, PositiveDefiniteMatrix, VectorGaussian)
EP message to mean
.
Declaration
public static VectorGaussian MeanAverageConditional(Vector Sample, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
MeanAverageLogarithm(VectorGaussian, Vector, Wishart, PositiveDefiniteMatrix, VectorGaussian)
VMP message to mean
.
Declaration
public static VectorGaussian MeanAverageLogarithm(VectorGaussian Sample, Vector SampleMean, Wishart Precision, PositiveDefiniteMatrix PrecisionMean, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
Vector | SampleMean | Buffer |
Wishart | Precision | Incoming message from |
PositiveDefiniteMatrix | PrecisionMean | Buffer |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except mean
. The formula is exp(sum_(sample,precision) p(sample,precision) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
MeanAverageLogarithm(VectorGaussian, Vector, PositiveDefiniteMatrix, VectorGaussian)
VMP message to mean
.
Declaration
public static VectorGaussian MeanAverageLogarithm(VectorGaussian Sample, Vector SampleMean, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except mean
. The formula is exp(sum_(sample) p(sample) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageLogarithm(Vector, Wishart, PositiveDefiniteMatrix, VectorGaussian)
VMP message to mean
.
Declaration
public static VectorGaussian MeanAverageLogarithm(Vector Sample, Wishart Precision, PositiveDefiniteMatrix PrecisionMean, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
Wishart | Precision | Incoming message from |
PositiveDefiniteMatrix | PrecisionMean | Buffer |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except mean
. The formula is exp(sum_(precision) p(precision) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageLogarithm(Vector, PositiveDefiniteMatrix, VectorGaussian)
VMP message to mean
.
Declaration
public static VectorGaussian MeanAverageLogarithm(Vector Sample, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
MeanConditional(Vector, PositiveDefiniteMatrix, VectorGaussian)
Gibbs message to mean
.
Declaration
public static VectorGaussian MeanConditional(Vector Sample, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
MeanMean(VectorGaussian, PositiveDefiniteMatrix, Vector)
Update the buffer MeanMean
.
Declaration
public static Vector MeanMean(VectorGaussian Mean, PositiveDefiniteMatrix MeanVariance, Vector result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
PositiveDefiniteMatrix | MeanVariance | Buffer |
Vector | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Vector |
|
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanMeanInit(VectorGaussian)
Initialize the buffer MeanMean
.
Declaration
public static Vector MeanMeanInit(VectorGaussian Mean)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
Returns
Type | Description |
---|---|
Vector | Initial value of buffer |
Remarks
MeanVariance(VectorGaussian, PositiveDefiniteMatrix)
Update the buffer MeanVariance
.
Declaration
public static PositiveDefiniteMatrix MeanVariance(VectorGaussian Mean, PositiveDefiniteMatrix result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
PositiveDefiniteMatrix | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
PositiveDefiniteMatrix |
|
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanVarianceInit(VectorGaussian)
Initialize the buffer MeanVariance
.
Declaration
public static PositiveDefiniteMatrix MeanVarianceInit(VectorGaussian Mean)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
Returns
Type | Description |
---|---|
PositiveDefiniteMatrix | Initial value of buffer |
Remarks
PrecisionAverageConditional(Vector, Vector, Wishart)
EP message to precision
.
Declaration
public static Wishart PrecisionAverageConditional(Vector Sample, Vector Mean, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
Vector | Mean | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the factor viewed as a function of precision
conditioned on the given values.
PrecisionAverageLogarithm(VectorGaussian, Vector, PositiveDefiniteMatrix, VectorGaussian, Vector, PositiveDefiniteMatrix, Wishart)
VMP message to precision
.
Declaration
public static Wishart PrecisionAverageLogarithm(VectorGaussian Sample, Vector SampleMean, PositiveDefiniteMatrix SampleVariance, VectorGaussian Mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
VectorGaussian | Mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except precision
. The formula is exp(sum_(sample,mean) p(sample,mean) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
PrecisionAverageLogarithm(VectorGaussian, Vector, PositiveDefiniteMatrix, Vector, Wishart)
VMP message to precision
.
Declaration
public static Wishart PrecisionAverageLogarithm(VectorGaussian Sample, Vector SampleMean, PositiveDefiniteMatrix SampleVariance, Vector Mean, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
Vector | SampleMean | Buffer |
PositiveDefiniteMatrix | SampleVariance | Buffer |
Vector | Mean | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except precision
. The formula is exp(sum_(sample) p(sample) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PrecisionAverageLogarithm(Vector, VectorGaussian, Vector, PositiveDefiniteMatrix, Wishart)
VMP message to precision
.
Declaration
public static Wishart PrecisionAverageLogarithm(Vector Sample, VectorGaussian Mean, Vector MeanMean, PositiveDefiniteMatrix MeanVariance, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
VectorGaussian | Mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | MeanVariance | Buffer |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except precision
. The formula is exp(sum_(mean) p(mean) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PrecisionAverageLogarithm(Vector, Vector, Wishart)
VMP message to precision
.
Declaration
public static Wishart PrecisionAverageLogarithm(Vector Sample, Vector Mean, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
Vector | Mean | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the factor viewed as a function of precision
conditioned on the given values.
PrecisionConditional(Vector, Vector, Wishart)
Gibbs message to precision
.
Declaration
public static Wishart PrecisionConditional(Vector Sample, Vector Mean, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
Vector | Mean | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the factor viewed as a function of precision
conditioned on the given values.
PrecisionConditional(Vector, Vector, Wishart, Vector)
Gibbs message to precision
.
Declaration
public static Wishart PrecisionConditional(Vector Sample, Vector Mean, Wishart result, Vector diff)
Parameters
Type | Name | Description |
---|---|---|
Vector | Sample | Constant value for |
Vector | Mean | Constant value for |
Wishart | result | Modified to contain the outgoing message. |
Vector | diff |
Returns
Type | Description |
---|---|
Wishart |
|
Remarks
The outgoing message is the factor viewed as a function of precision
conditioned on the given values.
PrecisionMean(Wishart, PositiveDefiniteMatrix)
Update the buffer PrecisionMean
.
Declaration
public static PositiveDefiniteMatrix PrecisionMean(Wishart Precision, PositiveDefiniteMatrix result)
Parameters
Type | Name | Description |
---|---|---|
Wishart | Precision | Incoming message from |
PositiveDefiniteMatrix | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
PositiveDefiniteMatrix |
|
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
PrecisionMeanInit(Wishart)
Initialize the buffer PrecisionMean
.
Declaration
public static PositiveDefiniteMatrix PrecisionMeanInit(Wishart Precision)
Parameters
Type | Name | Description |
---|---|---|
Wishart | Precision | Incoming message from |
Returns
Type | Description |
---|---|
PositiveDefiniteMatrix | Initial value of buffer |
Remarks
PrecisionMeanLogDet(Wishart)
Update the buffer PrecisionMeanLogDet
.
Declaration
public static double PrecisionMeanLogDet(Wishart Precision)
Parameters
Type | Name | Description |
---|---|---|
Wishart | Precision | Incoming message from |
Returns
Type | Description |
---|---|
Double | New value of buffer |
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional(VectorGaussian, PositiveDefiniteMatrix, VectorGaussian)
EP message to sample
.
Declaration
public static VectorGaussian SampleAverageConditional(VectorGaussian Mean, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
PositiveDefiniteMatrix | Precision | Constant value for |
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) p(mean) factor(sample,mean,precision)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional(Vector, PositiveDefiniteMatrix, VectorGaussian)
EP message to sample
.
Declaration
public static VectorGaussian SampleAverageConditional(Vector Mean, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Mean | Constant value for |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleAverageConditionalInit(VectorGaussian)
Declaration
public static VectorGaussian SampleAverageConditionalInit(VectorGaussian Mean)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
Returns
Type | Description |
---|---|
VectorGaussian |
Remarks
SampleAverageConditionalInit(Vector)
Declaration
public static VectorGaussian SampleAverageConditionalInit(Vector Mean)
Parameters
Type | Name | Description |
---|---|---|
Vector | Mean | Constant value for |
Returns
Type | Description |
---|---|
VectorGaussian |
Remarks
SampleAverageLogarithm(VectorGaussian, Vector, Wishart, PositiveDefiniteMatrix, VectorGaussian)
VMP message to sample
.
Declaration
public static VectorGaussian SampleAverageLogarithm(VectorGaussian Mean, Vector MeanMean, Wishart Precision, PositiveDefiniteMatrix PrecisionMean, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
Vector | MeanMean | Buffer |
Wishart | Precision | Incoming message from |
PositiveDefiniteMatrix | PrecisionMean | Buffer |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except sample
. The formula is exp(sum_(mean,precision) p(mean,precision) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
SampleAverageLogarithm(VectorGaussian, Vector, PositiveDefiniteMatrix, VectorGaussian)
VMP message to sample
.
Declaration
public static VectorGaussian SampleAverageLogarithm(VectorGaussian mean, Vector MeanMean, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | mean | Incoming message from |
Vector | MeanMean | Buffer |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except sample
. The formula is exp(sum_(mean) p(mean) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageLogarithm(Vector, Wishart, PositiveDefiniteMatrix, VectorGaussian)
VMP message to sample
.
Declaration
public static VectorGaussian SampleAverageLogarithm(Vector Mean, Wishart Precision, PositiveDefiniteMatrix PrecisionMean, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Mean | Constant value for |
Wishart | Precision | Incoming message from |
PositiveDefiniteMatrix | PrecisionMean | Buffer |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except sample
. The formula is exp(sum_(precision) p(precision) log(factor(sample,mean,precision)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageLogarithm(Vector, PositiveDefiniteMatrix, VectorGaussian)
VMP message to sample
.
Declaration
public static VectorGaussian SampleAverageLogarithm(Vector Mean, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Mean | Constant value for |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleAverageLogarithmInit(VectorGaussian)
Declaration
public static VectorGaussian SampleAverageLogarithmInit(VectorGaussian Mean)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Mean | Incoming message from |
Returns
Type | Description |
---|---|
VectorGaussian |
Remarks
SampleAverageLogarithmInit(Vector)
Declaration
public static VectorGaussian SampleAverageLogarithmInit(Vector Mean)
Parameters
Type | Name | Description |
---|---|---|
Vector | Mean | Constant value for |
Returns
Type | Description |
---|---|
VectorGaussian |
Remarks
SampleConditional(Vector, PositiveDefiniteMatrix, VectorGaussian)
Gibbs message to sample
.
Declaration
public static VectorGaussian SampleConditional(Vector Mean, PositiveDefiniteMatrix Precision, VectorGaussian result)
Parameters
Type | Name | Description |
---|---|---|
Vector | Mean | Constant value for |
PositiveDefiniteMatrix | Precision | Constant value for |
VectorGaussian | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
VectorGaussian |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleMean(VectorGaussian, PositiveDefiniteMatrix, Vector)
Update the buffer SampleMean
.
Declaration
public static Vector SampleMean(VectorGaussian Sample, PositiveDefiniteMatrix SampleVariance, Vector result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
PositiveDefiniteMatrix | SampleVariance | Buffer |
Vector | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Vector |
|
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleMeanInit(VectorGaussian)
Initialize the buffer SampleMean
.
Declaration
public static Vector SampleMeanInit(VectorGaussian Sample)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
Returns
Type | Description |
---|---|
Vector | Initial value of buffer |
Remarks
SampleVariance(VectorGaussian, PositiveDefiniteMatrix)
Update the buffer SampleVariance
.
Declaration
public static PositiveDefiniteMatrix SampleVariance(VectorGaussian Sample, PositiveDefiniteMatrix result)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
PositiveDefiniteMatrix | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
PositiveDefiniteMatrix |
|
Remarks
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleVarianceInit(VectorGaussian)
Initialize the buffer SampleVariance
.
Declaration
public static PositiveDefiniteMatrix SampleVarianceInit(VectorGaussian Sample)
Parameters
Type | Name | Description |
---|---|---|
VectorGaussian | Sample | Incoming message from |
Returns
Type | Description |
---|---|
PositiveDefiniteMatrix | Initial value of buffer |
Remarks