Class BetaOp
Provides outgoing messages for Sample(Double, Double), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(Beta), "Sample", new Type[]{typeof(double), typeof(double)})]
[Quality(QualityBand.Stable)]
public static class BetaOp
Methods
AverageLogFactor(Beta, Double, Double, Beta)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(Beta sample, double trueCount, double falseCount, Beta to_sample)
Parameters
Type | Name | Description |
---|---|---|
Beta | sample | Incoming message from |
Double | trueCount | Constant value for |
Double | falseCount | Constant value for |
Beta | to_sample | Outgoing message to |
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,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double, Gamma, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sample, Gamma trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gamma | trueCount | Incoming message from |
Double | falseCount | 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_(trueCount) p(trueCount) log(factor(sample,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double, Double, Gamma)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sample, double trueCount, Gamma falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Gamma | falseCount | Incoming message from |
Returns
Type | Description |
---|---|
Double | Average of the factor's log-value across the given argument distributions. |
Remarks
The formula for the result is sum_(falseCount) p(falseCount) log(factor(sample,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(Double, Double, Double)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(double sample, double trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Double | falseCount | 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,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
FalseCountAverageConditional(Double, Double)
EP message to falseCount
.
Declaration
public static Gamma FalseCountAverageConditional(double sample, double trueCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of falseCount
conditioned on the given values.
FalseCountAverageLogarithm(Double, Double)
VMP message to falseCount
.
Declaration
public static Gamma FalseCountAverageLogarithm(double sample, double trueCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of falseCount
conditioned on the given values.
LogAverageFactor(Beta, Double, Double, Beta)
Evidence message for EP.
Declaration
public static double LogAverageFactor(Beta sample, double trueCount, double falseCount, Beta to_sample)
Parameters
Type | Name | Description |
---|---|---|
Beta | sample | Incoming message from |
Double | trueCount | Constant value for |
Double | falseCount | Constant value for |
Beta | 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) p(sample) factor(sample,trueCount,falseCount))
.
LogAverageFactor(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogAverageFactor(double sample, double trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Double | falseCount | 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,trueCount,falseCount))
.
LogEvidenceRatio(Beta, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(Beta sample, double trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Beta | sample | Incoming message from |
Double | trueCount | Constant value for |
Double | falseCount | 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,trueCount,falseCount) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Gamma, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, Gamma trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Gamma | trueCount | Incoming message from |
Double | falseCount | 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_(trueCount) p(trueCount) factor(sample,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Double, Gamma)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, double trueCount, Gamma falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Gamma | falseCount | 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_(falseCount) p(falseCount) factor(sample,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(Double, Double, Double)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(double sample, double trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | trueCount | Constant value for |
Double | falseCount | 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,trueCount,falseCount))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
SampleAverageConditional(Double, Double)
EP message to sample
.
Declaration
public static Beta SampleAverageConditional(double trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | trueCount | Constant value for |
Double | falseCount | 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 sample
conditioned on the given values.
SampleAverageLogarithm(Double, Double)
VMP message to sample
.
Declaration
public static Beta SampleAverageLogarithm(double trueCount, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | trueCount | Constant value for |
Double | falseCount | Constant value for |
Returns
Type | Description |
---|---|
Beta | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
TrueCountAverageConditional(Double, Double)
EP message to trueCount
.
Declaration
public static Gamma TrueCountAverageConditional(double sample, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | falseCount | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
Remarks
The outgoing message is the factor viewed as a function of trueCount
conditioned on the given values.
TrueCountAverageLogarithm(Double, Double)
VMP message to trueCount
.
Declaration
public static Gamma TrueCountAverageLogarithm(double sample, double falseCount)
Parameters
Type | Name | Description |
---|---|---|
Double | sample | Constant value for |
Double | falseCount | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of trueCount
conditioned on the given values.