Class BernoulliIntegerSubsetFromBeta
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(typeof(BernoulliIntegerSubset), "Sample", new Type[]{typeof(ISparseList<double>)})]
[Quality(QualityBand.Preview)]
public class BernoulliIntegerSubsetFromBeta
Methods
AverageLogFactor(BernoulliIntegerSubset, ISparseList<Double>)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(BernoulliIntegerSubset sample, ISparseList<double> probTrue)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
ISparseList<Double> | probTrue | 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_(sample) p(sample) log(factor(sample,probTrue))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(BernoulliIntegerSubset, SparseBetaList)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(BernoulliIntegerSubset sample, SparseBetaList probTrue)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
SparseBetaList | probTrue | 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_(sample,probTrue) p(sample,probTrue) log(factor(sample,probTrue))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
AverageLogFactor(IList<Int32>, ISparseList<Double>)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(IList<int> sample, ISparseList<double> probTrue)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
ISparseList<Double> | probTrue | 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,probTrue))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
AverageLogFactor(IList<Int32>, SparseBetaList)
Evidence message for VMP.
Declaration
public static double AverageLogFactor(IList<int> sample, SparseBetaList probTrue)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
SparseBetaList | probTrue | 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_(probTrue) p(probTrue) log(factor(sample,probTrue))
. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
LogAverageFactor(BernoulliIntegerSubset, BernoulliIntegerSubset)
Evidence message for EP.
Declaration
public static double LogAverageFactor(BernoulliIntegerSubset sample, BernoulliIntegerSubset to_sample)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
BernoulliIntegerSubset | 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,probTrue))
.
LogAverageFactor(IList<Int32>, ISparseList<Double>)
Evidence message for EP.
Declaration
public static double LogAverageFactor(IList<int> sample, ISparseList<double> probTrue)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
ISparseList<Double> | probTrue | 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,probTrue))
.
LogAverageFactor(IList<Int32>, SparseBetaList)
Evidence message for EP.
Declaration
public static double LogAverageFactor(IList<int> sample, SparseBetaList probTrue)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
SparseBetaList | probTrue | 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_(probTrue) p(probTrue) factor(sample,probTrue))
.
LogEvidenceRatio(BernoulliIntegerSubset, ISparseList<Double>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(BernoulliIntegerSubset sample, ISparseList<double> probTrue)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
ISparseList<Double> | probTrue | 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,probTrue) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(BernoulliIntegerSubset, SparseBetaList)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(BernoulliIntegerSubset sample, SparseBetaList probTrue)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
SparseBetaList | probTrue | 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_(sample,probTrue) p(sample,probTrue) factor(sample,probTrue) / sum_sample p(sample) messageTo(sample))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(IList<Int32>, ISparseList<Double>)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<int> sample, ISparseList<double> probTrue)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
ISparseList<Double> | probTrue | 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,probTrue))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
LogEvidenceRatio(IList<Int32>, SparseBetaList)
Evidence message for EP.
Declaration
public static double LogEvidenceRatio(IList<int> sample, SparseBetaList probTrue)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
SparseBetaList | probTrue | 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_(probTrue) p(probTrue) factor(sample,probTrue))
. Adding up these values across all factors and variables gives the log-evidence estimate for EP.
ProbTrueAverageConditional(BernoulliIntegerSubset, SparseBetaList, SparseBetaList)
EP message to probTrue
.
Declaration
public static SparseBetaList ProbTrueAverageConditional(BernoulliIntegerSubset sample, SparseBetaList probTrue, SparseBetaList result)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
SparseBetaList | probTrue | Incoming message from |
SparseBetaList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
SparseBetaList |
|
Remarks
The outgoing message is a distribution matching the moments of probTrue
as the random arguments are varied. The formula is proj[p(probTrue) sum_(sample) p(sample) factor(sample,probTrue)]/p(probTrue)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
ProbTrueAverageConditional(IList<Int32>, SparseBetaList)
EP message to probTrue
.
Declaration
public static SparseBetaList ProbTrueAverageConditional(IList<int> sample, SparseBetaList result)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
SparseBetaList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
SparseBetaList |
|
Remarks
The outgoing message is the factor viewed as a function of probTrue
conditioned on the given values.
ProbTrueAverageLogarithm(BernoulliIntegerSubset, SparseBetaList)
VMP message to probTrue
.
Declaration
public static SparseBetaList ProbTrueAverageLogarithm(BernoulliIntegerSubset sample, SparseBetaList result)
Parameters
Type | Name | Description |
---|---|---|
BernoulliIntegerSubset | sample | Incoming message from |
SparseBetaList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
SparseBetaList |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except probTrue
. The formula is exp(sum_(sample) p(sample) log(factor(sample,probTrue)))
.
ProbTrueAverageLogarithm(IList<Int32>, SparseBetaList)
VMP message to probTrue
.
Declaration
public static SparseBetaList ProbTrueAverageLogarithm(IList<int> sample, SparseBetaList result)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
SparseBetaList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
SparseBetaList |
|
Remarks
The outgoing message is the factor viewed as a function of probTrue
conditioned on the given values.
ProbTrueConditional(IList<Int32>, SparseBetaList)
Gibbs message to probTrue
.
Declaration
public static SparseBetaList ProbTrueConditional(IList<int> sample, SparseBetaList result)
Parameters
Type | Name | Description |
---|---|---|
IList<Int32> | sample | Constant value for |
SparseBetaList | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
SparseBetaList |
|
Remarks
The outgoing message is the factor viewed as a function of probTrue
conditioned on the given values.
SampleAverageConditional(ISparseList<Double>, BernoulliIntegerSubset)
EP message to sample
.
Declaration
public static BernoulliIntegerSubset SampleAverageConditional(ISparseList<double> probTrue, BernoulliIntegerSubset result)
Parameters
Type | Name | Description |
---|---|---|
ISparseList<Double> | probTrue | Constant value for |
BernoulliIntegerSubset | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
BernoulliIntegerSubset |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleAverageConditional(SparseBetaList, BernoulliIntegerSubset)
EP message to sample
.
Declaration
public static BernoulliIntegerSubset SampleAverageConditional(SparseBetaList probTrue, BernoulliIntegerSubset result)
Parameters
Type | Name | Description |
---|---|---|
SparseBetaList | probTrue | Incoming message from |
BernoulliIntegerSubset | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
BernoulliIntegerSubset |
|
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_(probTrue) p(probTrue) factor(sample,probTrue)]/p(sample)
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleAverageLogarithm(ISparseList<Double>, BernoulliIntegerSubset)
VMP message to sample
.
Declaration
public static BernoulliIntegerSubset SampleAverageLogarithm(ISparseList<double> probTrue, BernoulliIntegerSubset result)
Parameters
Type | Name | Description |
---|---|---|
ISparseList<Double> | probTrue | Constant value for |
BernoulliIntegerSubset | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
BernoulliIntegerSubset |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.
SampleAverageLogarithm(SparseBetaList, BernoulliIntegerSubset)
VMP message to sample
.
Declaration
public static BernoulliIntegerSubset SampleAverageLogarithm(SparseBetaList probTrue, BernoulliIntegerSubset result)
Parameters
Type | Name | Description |
---|---|---|
SparseBetaList | probTrue | Incoming message from |
BernoulliIntegerSubset | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
BernoulliIntegerSubset |
|
Remarks
The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except sample
. The formula is exp(sum_(probTrue) p(probTrue) log(factor(sample,probTrue)))
.
Exceptions
Type | Condition |
---|---|
ImproperMessageException |
|
SampleConditional(ISparseList<Double>, BernoulliIntegerSubset)
Gibbs message to sample
.
Declaration
public static BernoulliIntegerSubset SampleConditional(ISparseList<double> probTrue, BernoulliIntegerSubset result)
Parameters
Type | Name | Description |
---|---|---|
ISparseList<Double> | probTrue | Constant value for |
BernoulliIntegerSubset | result | Modified to contain the outgoing message. |
Returns
Type | Description |
---|---|
BernoulliIntegerSubset |
|
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.