Class ConstrainEqualRandomOp<TDomain>
Provides outgoing messages for EqualRandom<TDomain, TDistribution>(TDomain, TDistribution), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Constrain), "EqualRandom<,>", new Type[]{})]
[Quality(QualityBand.Mature)]
public static class ConstrainEqualRandomOp<TDomain>
Type Parameters
Name | Description |
---|---|
TDomain | The domain of the constrained variables. |
Methods
AverageLogFactor<TDistribution>(TDistribution, TDistribution)
Evidence message for VMP.
Declaration
public static double AverageLogFactor<TDistribution>(TDistribution value, TDistribution dist)
where TDistribution : CanGetAverageLog<TDistribution>
Parameters
Type | Name | Description |
---|---|---|
TDistribution | value | Incoming message from |
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The formula for the result is sum_(value,dist) p(value,dist) log(factor(value,dist))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor<TDistribution>(TDomain, TDistribution)
Evidence message for VMP.
Declaration
public static double AverageLogFactor<TDistribution>(TDomain value, TDistribution dist)
where TDistribution : CanGetLogProb<TDomain>
Parameters
Type | Name | Description |
---|---|---|
TDomain | value | Incoming message from |
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The formula for the result is sum_(value,dist) p(value,dist) log(factor(value,dist))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor<TDistribution>(TDistribution, TDistribution)
Evidence message for EP.
Declaration
public static double LogAverageFactor<TDistribution>(TDistribution value, TDistribution dist)
where TDistribution : CanGetLogAverageOf<TDistribution>
Parameters
Type | Name | Description |
---|---|---|
TDistribution | value | Incoming message from |
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's average value across the given argument distributions. |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The formula for the result is log(sum_(value,dist) p(value,dist) factor(value,dist))
.
LogAverageFactor<TDistribution>(TDomain, TDistribution)
Evidence message for EP.
Declaration
public static double LogAverageFactor<TDistribution>(TDomain value, TDistribution dist)
where TDistribution : CanGetLogProb<TDomain>
Parameters
Type | Name | Description |
---|---|---|
TDomain | value | Incoming message from |
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's average value across the given argument distributions. |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The formula for the result is log(sum_(value,dist) p(value,dist) factor(value,dist))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogEvidenceRatio<TDistribution>(TDistribution, TDistribution)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio<TDistribution>(TDistribution value, TDistribution dist)
where TDistribution : CanGetLogAverageOf<TDistribution>
Parameters
Type | Name | Description |
---|---|---|
TDistribution | value | Incoming message from |
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The formula for the result is log(sum_(value,dist) p(value,dist) factor(value,dist))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio<TDistribution>(TDomain, TDistribution)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio<TDistribution>(TDomain value, TDistribution dist)
where TDistribution : CanGetLogProb<TDomain>
Parameters
Type | Name | Description |
---|---|---|
TDomain | value | Incoming message from |
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
Double | Logarithm of the factor's contribution the EP model evidence. |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The formula for the result is log(sum_(value,dist) p(value,dist) factor(value,dist))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
ValueAverageConditional<TDistribution>(TDistribution)
EP message to value
.
Declaration
public static TDistribution ValueAverageConditional<TDistribution>(TDistribution dist)
Parameters
Type | Name | Description |
---|---|---|
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
TDistribution | The outgoing EP message to the |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The outgoing message is a distribution matching the moments of value
as the random arguments are varied. The formula is proj[p(value) sum_(dist) p(dist) factor(value,dist)]/p(value)
.
ValueAverageLogarithm<TDistribution>(TDistribution)
VMP message to value
.
Declaration
public static TDistribution ValueAverageLogarithm<TDistribution>(TDistribution dist)
Parameters
Type | Name | Description |
---|---|---|
TDistribution | dist | Incoming message from |
Returns
Type | Description |
---|---|
TDistribution | The outgoing VMP message to the |
Type Parameters
Name | Description |
---|---|
TDistribution | The distribution over the constrained variables. |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except value
. The formula is exp(sum_(dist) p(dist) log(factor(value,dist)))
.