Class WishartFromShapeAndRateOp_Laplace2
Provides outgoing messages for SampleFromShapeAndRate(Double, PositiveDefiniteMatrix), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Wishart), "SampleFromShapeAndRate", new Type[]{typeof(double), typeof(PositiveDefiniteMatrix)})]
[Quality(QualityBand.Experimental)]
public static class WishartFromShapeAndRateOp_Laplace2
Methods
LogAverageFactor(Wishart, Double, Wishart, Wishart)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Wishart sample, double shape, Wishart rate, Wishart to_sample)
Parameters
Type | Name | Description |
---|---|---|
Wishart | sample | Incoming message from |
Double | shape | Constant value for |
Wishart | rate | Incoming message from |
Wishart | 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,rate) p(sample,rate) factor(sample,shape,rate))
.
LogEvidenceRatio(Wishart, Double, Wishart, Wishart)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Wishart sample, double shape, Wishart rate, Wishart to_sample)
Parameters
Type | Name | Description |
---|---|---|
Wishart | sample | Incoming message from |
Double | shape | Constant value for |
Wishart | rate | Incoming message from |
Wishart | to_sample | 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,rate) p(sample,rate) factor(sample,shape,rate) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
RateAverageConditional(Wishart, Double, Wishart, Wishart, Wishart)
EP message to rate
.
Declaration
public static Wishart RateAverageConditional(Wishart sample, double shape, Wishart rate, Wishart to_rate, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Wishart | sample | Incoming message from |
Double | shape | Constant value for |
Wishart | rate | Incoming message from |
Wishart | to_rate | 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 rate
as the random arguments are varied. The formula is proj[p(rate) sum_(sample) p(sample) factor(sample,shape,rate)]/p(rate)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional(Wishart, Double, Wishart, Wishart, Wishart, Wishart)
EP message to sample
.
Declaration
public static Wishart SampleAverageConditional(Wishart sample, double shape, Wishart rate, Wishart to_rate, Wishart to_sample, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Wishart | sample | Incoming message from |
Double | shape | Constant value for |
Wishart | rate | Incoming message from |
Wishart | to_rate | Previous outgoing message to |
Wishart | to_sample | 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 sample
as the random arguments are varied. The formula is proj[p(sample) sum_(rate) p(rate) factor(sample,shape,rate)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageConditional2(Double, Wishart, Wishart, Wishart)
Declaration
public static Wishart SampleAverageConditional2(double shape, Wishart rate, Wishart to_rate, Wishart result)
Parameters
Type | Name | Description |
---|---|---|
Double | shape | |
Wishart | rate | |
Wishart | to_rate | |
Wishart | result |
Returns
Type | Description |
---|---|
Wishart |