Search Results for

    Show / Hide Table of Contents

    Class BernoulliFromBooleanOp

    Provides outgoing messages for BernoulliFromBoolean(Boolean, Double, Double), given random arguments to the function.

    Inheritance
    Object
    BernoulliFromBooleanOp
    Inherited Members
    Object.Equals(Object)
    Object.Equals(Object, Object)
    Object.GetHashCode()
    Object.GetType()
    Object.MemberwiseClone()
    Object.ReferenceEquals(Object, Object)
    Object.ToString()
    Namespace: Microsoft.ML.Probabilistic.Factors
    Assembly: Microsoft.ML.Probabilistic.dll
    Syntax
    [FactorMethod(new string[]{"Sample", "Choice", "ProbTrue0", "ProbTrue1"}, typeof(Factor), "BernoulliFromBoolean", new Type[]{typeof(bool), typeof(double), typeof(double)})]
    public static class BernoulliFromBooleanOp

    Methods

    ChoiceAverageConditional(Bernoulli, Double, Double)

    EP message to choice.

    Declaration
    public static Bernoulli ChoiceAverageConditional(Bernoulli sample, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Bernoulli sample

    Incoming message from sample. Must be a proper distribution. If uniform, the result will be uniform.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the choice argument.

    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,probTrue0,probTrue1)]/p(choice).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ChoiceAverageConditional(Boolean, Double, Double)

    EP message to choice.

    Declaration
    public static Bernoulli ChoiceAverageConditional(bool sample, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Boolean sample

    Constant value for sample.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the choice argument.

    Remarks

    The outgoing message is the factor viewed as a function of choice conditioned on the given values.

    ChoiceAverageLogarithm(Bernoulli, Double, Double)

    VMP message to choice.

    Declaration
    public static Bernoulli ChoiceAverageLogarithm(Bernoulli sample, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Bernoulli sample

    Incoming message from sample.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing VMP message to the choice argument.

    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,probTrue0,probTrue1))).

    ChoiceAverageLogarithm(Boolean, Double, Double)

    VMP message to choice.

    Declaration
    public static Bernoulli ChoiceAverageLogarithm(bool sample, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Boolean sample

    Constant value for sample.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing VMP message to the choice argument.

    Remarks

    The outgoing message is the factor viewed as a function of choice conditioned on the given values.

    ChoiceConditional(Boolean, Double, Double)

    Gibbs message to choice.

    Declaration
    public static Bernoulli ChoiceConditional(bool sample, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Boolean sample

    Constant value for sample.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing Gibbs message to the choice argument.

    Remarks

    The outgoing message is the factor viewed as a function of choice conditioned on the given values.

    SampleAverageConditional(Bernoulli, Double, Double)

    EP message to sample.

    Declaration
    public static Bernoulli SampleAverageConditional(Bernoulli choice, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Bernoulli choice

    Incoming message from choice.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the sample argument.

    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,probTrue0,probTrue1)]/p(sample).

    SampleAverageConditional(Boolean, Double, Double)

    EP message to sample.

    Declaration
    public static Bernoulli SampleAverageConditional(bool choice, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Boolean choice

    Constant value for choice.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the sample argument.

    Remarks

    The outgoing message is the factor viewed as a function of sample conditioned on the given values.

    SampleAverageLogarithm(Bernoulli, Double, Double)

    VMP message to sample.

    Declaration
    public static Bernoulli SampleAverageLogarithm(Bernoulli choice, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Bernoulli choice

    Incoming message from choice.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing VMP message to the sample argument.

    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,probTrue0,probTrue1))).

    SampleAverageLogarithm(Boolean, Double, Double)

    VMP message to sample.

    Declaration
    public static Bernoulli SampleAverageLogarithm(bool choice, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Boolean choice

    Constant value for choice.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing VMP message to the sample argument.

    Remarks

    The outgoing message is the factor viewed as a function of sample conditioned on the given values.

    SampleConditional(Boolean, Double, Double)

    Gibbs message to sample.

    Declaration
    public static Bernoulli SampleConditional(bool choice, double probTrue0, double probTrue1)
    Parameters
    Type Name Description
    Boolean choice

    Constant value for choice.

    Double probTrue0

    Constant value for probTrue0.

    Double probTrue1

    Constant value for probTrue1.

    Returns
    Type Description
    Bernoulli

    The outgoing Gibbs message to the sample argument.

    Remarks

    The outgoing message is the factor viewed as a function of sample conditioned on the given values.

    In This Article
    Back to top Copyright © .NET Foundation. All rights reserved.