Class BernoulliFromBooleanArray
Provides outgoing messages for BernoulliFromBoolean(Boolean, Double[]), given random arguments to the function.
Inherited Members
Namespace: Microsoft.ML.Probabilistic.Factors
Assembly: Microsoft.ML.Probabilistic.dll
Syntax
[FactorMethod(new string[]{"Sample", "Choice", "ProbTrue"}, typeof(Factor), "BernoulliFromBoolean", new Type[]{typeof(bool), typeof(double[])})]
public static class BernoulliFromBooleanArray
Methods
ChoiceAverageConditional(Bernoulli, Double[])
EP message to choice.
Declaration
public static Bernoulli ChoiceAverageConditional(Bernoulli sample, double[] probTrue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bernoulli | sample | Incoming message from |
| Double[] | probTrue | Constant value for |
Returns
| Type | Description |
|---|---|
| Bernoulli | The outgoing EP message to the |
Remarks
The outgoing message is a distribution matching the moments of choice as the random arguments are varied. The formula is proj[p(choice) sum_(sample) p(sample) factor(sample,choice,probTrue)]/p(choice).
ChoiceAverageLogarithm(Bernoulli, Double[])
VMP message to choice.
Declaration
public static Bernoulli ChoiceAverageLogarithm(Bernoulli sample, double[] probTrue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bernoulli | sample | Incoming message from |
| Double[] | probTrue | Constant value for |
Returns
| Type | Description |
|---|---|
| Bernoulli | 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 choice. The formula is exp(sum_(sample) p(sample) log(factor(sample,choice,probTrue))).
SampleAverageConditional(Bernoulli, Double[])
EP message to sample.
Declaration
public static Bernoulli SampleAverageConditional(Bernoulli choice, double[] probTrue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bernoulli | choice | Incoming message from |
| Double[] | probTrue | Constant value for |
Returns
| Type | Description |
|---|---|
| Bernoulli | The outgoing EP message to the |
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_(choice) p(choice) factor(sample,choice,probTrue)]/p(sample).
SampleAverageConditional(Boolean, Double[])
EP message to sample.
Declaration
public static Bernoulli SampleAverageConditional(bool choice, double[] probTrue)
Parameters
| Type | Name | Description |
|---|---|---|
| Boolean | choice | Constant value for |
| Double[] | probTrue | 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 sample conditioned on the given values.
SampleAverageLogarithm(Bernoulli, Double[])
VMP message to sample.
Declaration
public static Bernoulli SampleAverageLogarithm(Bernoulli choice, double[] probTrue)
Parameters
| Type | Name | Description |
|---|---|---|
| Bernoulli | choice | Incoming message from |
| Double[] | probTrue | Constant value for |
Returns
| Type | Description |
|---|---|
| Bernoulli | 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 sample. The formula is exp(sum_(choice) p(choice) log(factor(sample,choice,probTrue))).