Class BetaFromMeanAndTotalCountOp
Provides outgoing messages for BetaFromMeanAndTotalCount(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Factor), "BetaFromMeanAndTotalCount", new Type[]{})]
[Quality(QualityBand.Experimental)]
public static class BetaFromMeanAndTotalCountOp
Fields
damping
How much damping to use to avoid improper messages. A higher value implies more damping.
Declaration
public static double damping
Field Value
Type | Description |
---|---|
Double |
Methods
AverageLogFactor(Double, Double, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double prob, double mean, double totalCount)
Parameters
Type | Name | Description |
---|---|---|
Double | prob | Constant value for |
Double | mean | Constant value for |
Double | totalCount | 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(prob,mean,totalCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
LogAverageFactor(Beta, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Beta prob, double mean, double totalCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | prob | Incoming message from |
Double | mean | Constant value for |
Double | totalCount | 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_(prob) p(prob) factor(prob,mean,totalCount))
.
LogAverageFactor(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double prob, double mean, double totalCount)
Parameters
Type | Name | Description |
---|---|---|
Double | prob | Constant value for |
Double | mean | Constant value for |
Double | totalCount | 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(prob,mean,totalCount))
.
MeanAverageConditional(Beta, Gamma, Beta, Beta)
EP message to mean
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta MeanAverageConditional(Beta mean, Gamma totalCount, Beta prob, Beta result)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Beta | prob | Incoming message from |
Beta | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Beta |
|
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_(totalCount,prob) p(totalCount,prob) factor(prob,mean,totalCount)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ImproperMessageException |
|
MeanAverageConditional(Beta, Gamma, Double, Beta)
EP message to mean
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta MeanAverageConditional(Beta mean, Gamma totalCount, double prob, Beta result)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Double | prob | Constant value for |
Beta | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Beta |
|
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_(totalCount) p(totalCount) factor(prob,mean,totalCount)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
MeanAverageConditional(Beta, Double, Beta, Beta)
EP message to mean
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta MeanAverageConditional(Beta mean, double totalCount, Beta prob, Beta result)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Double | totalCount | Constant value for |
Beta | prob | Incoming message from |
Beta | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Beta |
|
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_(prob) p(prob) factor(prob,mean,totalCount)]/p(mean)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
MeanAverageConditional(Beta, Double, Double, Beta)
EP message to mean
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta MeanAverageConditional(Beta mean, double totalCount, double prob, Beta result)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Double | totalCount | Constant value for |
Double | prob | Constant value for |
Beta | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Beta |
|
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageLogarithm(Beta, Beta, Gamma, Beta)
VMP message to mean
.
Declaration
public static Beta MeanAverageLogarithm(Beta prob, Beta mean, Gamma totalCount, Beta to_mean)
Parameters
Type | Name | Description |
---|---|---|
Beta | prob | Incoming message from |
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Beta | to_mean | Previous outgoing message to |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
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_(prob,totalCount) p(prob,totalCount) log(factor(prob,mean,totalCount)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
MeanAverageLogarithm(Double, Beta, Gamma, Beta)
VMP message to mean
.
Declaration
public static Beta MeanAverageLogarithm(double prob, Beta mean, Gamma totalCount, Beta to_mean)
Parameters
Type | Name | Description |
---|---|---|
Double | prob | Constant value for |
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Beta | to_mean | Previous outgoing message to |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
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_(totalCount) p(totalCount) log(factor(prob,mean,totalCount)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
MeanAverageLogarithm(Double, Beta, Double, Beta)
VMP message to mean
.
Declaration
public static Beta MeanAverageLogarithm(double prob, Beta mean, double totalCount, Beta to_mean)
Parameters
Type | Name | Description |
---|---|---|
Double | prob | Constant value for |
Beta | mean | Incoming message from |
Double | totalCount | Constant value for |
Beta | to_mean | Previous outgoing message to |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of mean
conditioned on the given values.
ProbAverageConditional(Beta, Gamma)
EP message to prob
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta ProbAverageConditional(Beta mean, Gamma totalCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Returns
Type | Description |
---|---|
Beta | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of prob
as the random arguments are varied. The formula is proj[p(prob) sum_(mean,totalCount) p(mean,totalCount) factor(prob,mean,totalCount)]/p(prob)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ProbAverageConditional(Beta, Double)
EP message to prob
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta ProbAverageConditional(Beta mean, double totalCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Double | totalCount | Constant value for |
Returns
Type | Description |
---|---|
Beta | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of prob
as the random arguments are varied. The formula is proj[p(prob) sum_(mean) p(mean) factor(prob,mean,totalCount)]/p(prob)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ProbAverageConditional(Double, Gamma)
EP message to prob
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Beta ProbAverageConditional(double mean, Gamma totalCount)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Gamma | totalCount | Incoming message from |
Returns
Type | Description |
---|---|
Beta | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of prob
as the random arguments are varied. The formula is proj[p(prob) sum_(totalCount) p(totalCount) factor(prob,mean,totalCount)]/p(prob)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ProbAverageConditional(Double, Double)
EP message to prob
.
Declaration
public static Beta ProbAverageConditional(double mean, double totalCount)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Double | totalCount | Constant value for |
Returns
Type | Description |
---|---|
Beta | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of prob
conditioned on the given values.
ProbAverageLogarithm(Beta, Gamma)
VMP message to prob
.
Declaration
public static Beta ProbAverageLogarithm(Beta mean, Gamma totalCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob
. The formula is exp(sum_(mean,totalCount) p(mean,totalCount) log(factor(prob,mean,totalCount)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ProbAverageLogarithm(Beta, Double)
VMP message to prob
.
Declaration
public static Beta ProbAverageLogarithm(Beta mean, double totalCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Double | totalCount | Constant value for |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob
. The formula is exp(sum_(mean) p(mean) log(factor(prob,mean,totalCount)))
.
ProbAverageLogarithm(Double, Gamma)
VMP message to prob
.
Declaration
public static Beta ProbAverageLogarithm(double mean, Gamma totalCount)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Gamma | totalCount | Incoming message from |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob
. The formula is exp(sum_(totalCount) p(totalCount) log(factor(prob,mean,totalCount)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
TotalCountAverageConditional(Beta, Gamma, Beta, Gamma)
EP message to totalCount
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Gamma TotalCountAverageConditional(Beta mean, Gamma totalCount, Beta prob, Gamma result)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Beta | prob | Incoming message from |
Gamma | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Gamma |
|
Remarks
The outgoing message is a distribution matching the moments of totalCount
as the random arguments are varied. The formula is proj[p(totalCount) sum_(mean,prob) p(mean,prob) factor(prob,mean,totalCount)]/p(totalCount)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
ImproperMessageException |
|
TotalCountAverageConditional(Beta, Gamma, Double, Gamma)
EP message to totalCount
.
Declaration
[NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
public static Gamma TotalCountAverageConditional(Beta mean, Gamma totalCount, double prob, Gamma result)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Double | prob | Constant value for |
Gamma | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
Gamma |
|
Remarks
The outgoing message is a distribution matching the moments of totalCount
as the random arguments are varied. The formula is proj[p(totalCount) sum_(mean) p(mean) factor(prob,mean,totalCount)]/p(totalCount)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|
TotalCountAverageLogarithm(Beta, Gamma, Beta, Gamma)
VMP message to totalCount
.
Declaration
public static Gamma TotalCountAverageLogarithm(Beta mean, Gamma totalCount, Beta prob, Gamma to_totalCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | mean | Incoming message from |
Gamma | totalCount | Incoming message from |
Beta | prob | Incoming message from |
Gamma | to_totalCount | Previous outgoing message to |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except totalCount
. The formula is exp(sum_(mean,prob) p(mean,prob) log(factor(prob,mean,totalCount)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ImproperMessageException |
|