Search Results for

    Show / Hide Table of Contents

    Class GateExitTwoOp

    Provides outgoing messages for ExitTwo<T>(Boolean, Boolean, T[]), given random arguments to the function.

    Inheritance
    Object
    GateExitTwoOp
    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(typeof(Gate), "ExitTwo<>", new Type[]{})]
    [Quality(QualityBand.Mature)]
    public static class GateExitTwoOp

    Methods

    AverageLogFactor<TExit>(TExit, Bernoulli, Bernoulli, IList<TExit>, TExit)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor<TExit>(TExit exitTwo, Bernoulli case0, Bernoulli case1, IList<TExit> values, TExit to_exitTwo)
        where TExit : ICloneable, SettableToProduct<TExit>, SettableToPower<TExit>, CanGetAverageLog<TExit>, SettableToUniform, SettableTo<TExit>, SettableToRatio<TExit>, SettableToWeightedSum<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    Bernoulli case0

    Incoming message from case0.

    Bernoulli case1

    Incoming message from case1.

    IList<TExit> values

    Incoming message from values.

    TExit to_exitTwo

    Outgoing message to exitTwo.

    Returns
    Type Description
    Double

    Zero.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Case0AverageConditional<TExit>(IList<TExit>)

    EP message to case0.

    Declaration
    public static Bernoulli Case0AverageConditional<TExit>([SkipIfAllUniform] IList<TExit> values)
    Parameters
    Type Name Description
    IList<TExit> values

    Incoming message from values. Must be a proper distribution. If all elements are uniform, the result will be uniform.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the case0 argument.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of case0 as the random arguments are varied. The formula is proj[p(case0) sum_(values) p(values) factor(exitTwo,case0,case1,values)]/p(case0).

    Exceptions
    Type Condition
    ImproperMessageException

    values is not a proper distribution.

    Case0AverageConditional<TExit, TExitDomain>(TExit, IList<TExitDomain>)

    EP message to case0.

    Declaration
    public static Bernoulli Case0AverageConditional<TExit, TExitDomain>(TExit exitTwo, IList<TExitDomain> values)
        where TExit : CanGetLogProb<TExitDomain>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    IList<TExitDomain> values

    Incoming message from values.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the case0 argument.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    TExitDomain

    The domain of the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of case0 as the random arguments are varied. The formula is proj[p(case0) sum_(exitTwo,values) p(exitTwo,values) factor(exitTwo,case0,case1,values)]/p(case0).

    Case0AverageLogarithm<TExit>(TExit, IList<TExit>)

    VMP message to case0.

    Declaration
    public static Bernoulli Case0AverageLogarithm<TExit>(TExit exitTwo, [SkipIfAllUniform] IList<TExit> values)
        where TExit : CanGetAverageLog<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    IList<TExit> values

    Incoming message from values. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Returns
    Type Description
    Bernoulli

    The outgoing VMP message to the case0 argument.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except case0. Because the factor is deterministic, exitTwo is integrated out before taking the logarithm. The formula is exp(sum_(values) p(values) log(sum_exitTwo p(exitTwo) factor(exitTwo,case0,case1,values))).

    Exceptions
    Type Condition
    ImproperMessageException

    values is not a proper distribution.

    Case1AverageConditional<TExit>(IList<TExit>)

    EP message to case1.

    Declaration
    public static Bernoulli Case1AverageConditional<TExit>([SkipIfAllUniform] IList<TExit> values)
    Parameters
    Type Name Description
    IList<TExit> values

    Incoming message from values. Must be a proper distribution. If all elements are uniform, the result will be uniform.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the case1 argument.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of case1 as the random arguments are varied. The formula is proj[p(case1) sum_(values) p(values) factor(exitTwo,case0,case1,values)]/p(case1).

    Exceptions
    Type Condition
    ImproperMessageException

    values is not a proper distribution.

    Case1AverageConditional<TExit, TExitDomain>(TExit, IList<TExitDomain>)

    EP message to case1.

    Declaration
    public static Bernoulli Case1AverageConditional<TExit, TExitDomain>(TExit exitTwo, IList<TExitDomain> values)
        where TExit : CanGetLogProb<TExitDomain>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    IList<TExitDomain> values

    Incoming message from values.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the case1 argument.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    TExitDomain

    The domain of the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of case1 as the random arguments are varied. The formula is proj[p(case1) sum_(exitTwo,values) p(exitTwo,values) factor(exitTwo,case0,case1,values)]/p(case1).

    Case1AverageLogarithm<TExit>(TExit, IList<TExit>)

    VMP message to case1.

    Declaration
    public static Bernoulli Case1AverageLogarithm<TExit>(TExit exitTwo, [SkipIfAllUniform] IList<TExit> values)
        where TExit : CanGetAverageLog<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    IList<TExit> values

    Incoming message from values. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Returns
    Type Description
    Bernoulli

    The outgoing VMP message to the case1 argument.

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except case1. Because the factor is deterministic, exitTwo is integrated out before taking the logarithm. The formula is exp(sum_(values) p(values) log(sum_exitTwo p(exitTwo) factor(exitTwo,case0,case1,values))).

    Exceptions
    Type Condition
    ImproperMessageException

    values is not a proper distribution.

    ExitTwoAverageConditional<TExit>(TExit, Bernoulli, Bernoulli, IList<TExit>, TExit)

    EP message to exitTwo.

    Declaration
    public static TExit ExitTwoAverageConditional<TExit>(TExit exitTwo, Bernoulli case0, Bernoulli case1, [SkipIfAllUniform] IList<TExit> values, TExit result)
        where TExit : SettableTo<TExit>, ICloneable, SettableToProduct<TExit>, SettableToRatio<TExit>, SettableToWeightedSum<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    Bernoulli case0

    Incoming message from case0.

    Bernoulli case1

    Incoming message from case1.

    IList<TExit> values

    Incoming message from values. Must be a proper distribution. If all elements are uniform, the result will be uniform.

    TExit result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TExit

    result

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of exitTwo as the random arguments are varied. The formula is proj[p(exitTwo) sum_(case0,case1,values) p(case0,case1,values) factor(exitTwo,case0,case1,values)]/p(exitTwo).

    Exceptions
    Type Condition
    ImproperMessageException

    values is not a proper distribution.

    ExitTwoAverageConditional<TExit, TExitDomain>(TExit, Bernoulli, Bernoulli, IList<TExitDomain>, TExit)

    EP message to exitTwo.

    Declaration
    public static TExit ExitTwoAverageConditional<TExit, TExitDomain>(TExit exitTwo, Bernoulli case0, Bernoulli case1, IList<TExitDomain> values, TExit result)
        where TExit : ICloneable, HasPoint<TExitDomain>, SettableToWeightedSum<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

    Incoming message from exitTwo.

    Bernoulli case0

    Incoming message from case0.

    Bernoulli case1

    Incoming message from case1.

    IList<TExitDomain> values

    Incoming message from values.

    TExit result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TExit

    result

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    TExitDomain

    The domain of the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of exitTwo as the random arguments are varied. The formula is proj[p(exitTwo) sum_(case0,case1,values) p(case0,case1,values) factor(exitTwo,case0,case1,values)]/p(exitTwo).

    ExitTwoAverageLogarithm<TExit>(Bernoulli, Bernoulli, IList<TExit>, TExit)

    VMP message to exitTwo.

    Declaration
    public static TExit ExitTwoAverageLogarithm<TExit>(Bernoulli case0, Bernoulli case1, [SkipIfAllUniform] IList<TExit> values, TExit result)
        where TExit : ICloneable, SettableToProduct<TExit>, SettableToPower<TExit>, CanGetAverageLog<TExit>, SettableToUniform, SettableTo<TExit>, SettableToRatio<TExit>, SettableToWeightedSum<TExit>
    Parameters
    Type Name Description
    Bernoulli case0

    Incoming message from case0.

    Bernoulli case1

    Incoming message from case1.

    IList<TExit> values

    Incoming message from values. Must be a proper distribution. If any element is uniform, the result will be uniform.

    TExit result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TExit

    result

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    Remarks

    The outgoing message is a distribution matching the moments of exitTwo as the random arguments are varied. The formula is proj[sum_(case0,case1,values) p(case0,case1,values) factor(exitTwo,case0,case1,values)].

    Exceptions
    Type Condition
    ImproperMessageException

    values is not a proper distribution.

    ValuesAverageConditional<TExit, TResultList>(TExit, TResultList)

    EP message to values.

    Declaration
    public static TResultList ValuesAverageConditional<TExit, TResultList>(TExit exitTwo, TResultList result)
        where TResultList : CanSetAllElementsTo<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

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

    TResultList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TResultList

    result

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    TResultList

    The type of the outgoing message.

    Remarks

    The outgoing message is a distribution matching the moments of values as the random arguments are varied. The formula is proj[p(values) sum_(exitTwo) p(exitTwo) factor(exitTwo,case0,case1,values)]/p(values).

    Exceptions
    Type Condition
    ImproperMessageException

    exitTwo is not a proper distribution.

    ValuesAverageLogarithm<TExit, TResultList>(TExit, TResultList)

    VMP message to values.

    Declaration
    public static TResultList ValuesAverageLogarithm<TExit, TResultList>(TExit exitTwo, TResultList result)
        where TResultList : CanSetAllElementsTo<TExit>
    Parameters
    Type Name Description
    TExit exitTwo

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

    TResultList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    TResultList

    result

    Type Parameters
    Name Description
    TExit

    The type of the distribution over the variable exiting the gate.

    TResultList

    The type of the outgoing message.

    Remarks

    The outgoing message is the factor viewed as a function of values with exitTwo integrated out. The formula is sum_exitTwo p(exitTwo) factor(exitTwo,case0,case1,values).

    Exceptions
    Type Condition
    ImproperMessageException

    exitTwo is not a proper distribution.

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