Class BooleanNotOp
Provides outgoing messages for Not(Boolean), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "Not", new Type[]{})]
[Quality(QualityBand.Mature)]
public static class BooleanNotOp
Methods
AverageLogFactor()
Evidence message for VMP.
Declaration
public static double AverageLogFactor()
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
The formula for the result is log(factor(not,b))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Boolean, Boolean)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(bool not, bool b)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Boolean | b | Constant value for |
Returns
Type | Description |
---|---|
Double | Zero. |
Remarks
The formula for the result is log(factor(not,b))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
BAverageConditional(Bernoulli)
EP message to b
.
Declaration
public static Bernoulli BAverageConditional(Bernoulli not)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | not | Incoming message from |
Returns
Type | Description |
---|---|
Bernoulli | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of b
as the random arguments are varied. The formula is proj[p(b) sum_(not) p(not) factor(not,b)]/p(b)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
BAverageConditional(Boolean)
EP message to b
.
Declaration
public static Bernoulli BAverageConditional(bool not)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Returns
Type | Description |
---|---|
Bernoulli | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of b
conditioned on the given values.
BAverageLogarithm(Bernoulli)
VMP message to b
.
Declaration
public static Bernoulli BAverageLogarithm(Bernoulli not)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | not | Incoming message from |
Returns
Type | Description |
---|---|
Bernoulli | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of b
with not
integrated out. The formula is sum_not p(not) factor(not,b)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
BAverageLogarithm(Boolean)
VMP message to b
.
Declaration
public static Bernoulli BAverageLogarithm(bool not)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Returns
Type | Description |
---|---|
Bernoulli | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of b
conditioned on the given values.
LogAverageFactor(Bernoulli, Bernoulli, Bernoulli)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Bernoulli not, Bernoulli b, Bernoulli to_not)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | not | Incoming message from |
Bernoulli | b | Incoming message from |
Bernoulli | to_not | 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_(not,b) p(not,b) factor(not,b))
.
LogAverageFactor(Bernoulli, Boolean)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Bernoulli not, bool b)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | not | Incoming message from |
Boolean | b | 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_(not) p(not) factor(not,b))
.
LogAverageFactor(Boolean, Bernoulli)
Evidence message for EP.
Declaration
public static double LogAverageFactor(bool not, Bernoulli b)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Bernoulli | b | 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_(b) p(b) factor(not,b))
.
LogAverageFactor(Boolean, Boolean)
Evidence message for EP.
Declaration
public static double LogAverageFactor(bool not, bool b)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Boolean | b | 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(not,b))
.
LogEvidenceRatio(Bernoulli)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Bernoulli not)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | not | 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_(not) p(not) factor(not,b) / sum_not p(not) messageTo(not))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Boolean, Bernoulli)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(bool not, Bernoulli b)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Bernoulli | b | 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_(b) p(b) factor(not,b))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Boolean, Boolean)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(bool not, bool b)
Parameters
Type | Name | Description |
---|---|---|
Boolean | not | Constant value for |
Boolean | b | 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(not,b))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
NotAverageConditional(Bernoulli)
EP message to not
.
Declaration
public static Bernoulli NotAverageConditional(Bernoulli b)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | b | Incoming message from |
Returns
Type | Description |
---|---|
Bernoulli | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of not
as the random arguments are varied. The formula is proj[p(not) sum_(b) p(b) factor(not,b)]/p(not)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
NotAverageLogarithm(Bernoulli)
VMP message to not
.
Declaration
public static Bernoulli NotAverageLogarithm(Bernoulli b)
Parameters
Type | Name | Description |
---|---|---|
Bernoulli | b | Incoming message from |
Returns
Type | Description |
---|---|
Bernoulli | The outgoing VMP message to the |
Remarks
The outgoing message is a distribution matching the moments of not
as the random arguments are varied. The formula is proj[sum_(b) p(b) factor(not,b)]
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|