Search Results for

    Show / Hide Table of Contents

    Class EnumToIntOp<TEnum>

    Provides outgoing messages for EnumToInt<TEnum>(TEnum), given random arguments to the function.

    Inheritance
    Object
    EnumToIntOp<TEnum>
    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(EnumSupport), "EnumToInt<>", new Type[]{})]
    [Quality(QualityBand.Preview)]
    public static class EnumToIntOp<TEnum>
    Type Parameters
    Name Description
    TEnum

    The type of the enumeration.

    Methods

    AverageLogFactor()

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor()
    Returns
    Type Description
    Double

    Zero.

    Remarks

    The formula for the result is log(factor(Int,Enum)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    AverageLogFactor(Int32, TEnum)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(int Int, TEnum Enum)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    TEnum Enum

    Incoming message from Enum.

    Returns
    Type Description
    Double

    Zero.

    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.

    EnumAverageConditional(Discrete, DiscreteEnum<TEnum>)

    EP message to Enum.

    Declaration
    public static DiscreteEnum<TEnum> EnumAverageConditional(Discrete Int, DiscreteEnum<TEnum> result)
    Parameters
    Type Name Description
    Discrete Int

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

    DiscreteEnum<TEnum> result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DiscreteEnum<TEnum>

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Int is not a proper distribution.

    EnumAverageConditional(Int32, DiscreteEnum<TEnum>)

    EP message to Enum.

    Declaration
    public static DiscreteEnum<TEnum> EnumAverageConditional(int Int, DiscreteEnum<TEnum> result)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    DiscreteEnum<TEnum> result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DiscreteEnum<TEnum>

    result

    Remarks

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

    EnumAverageLogarithm(Discrete, DiscreteEnum<TEnum>)

    VMP message to Enum.

    Declaration
    public static DiscreteEnum<TEnum> EnumAverageLogarithm(Discrete Int, DiscreteEnum<TEnum> result)
    Parameters
    Type Name Description
    Discrete Int

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

    DiscreteEnum<TEnum> result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DiscreteEnum<TEnum>

    result

    Remarks

    The outgoing message is the factor viewed as a function of Enum with Int integrated out. The formula is sum_Int p(Int) factor(Int,Enum).

    Exceptions
    Type Condition
    ImproperMessageException

    Int is not a proper distribution.

    EnumAverageLogarithm(Int32, DiscreteEnum<TEnum>)

    VMP message to Enum.

    Declaration
    public static DiscreteEnum<TEnum> EnumAverageLogarithm(int Int, DiscreteEnum<TEnum> result)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    DiscreteEnum<TEnum> result

    Modified to contain the outgoing message.

    Returns
    Type Description
    DiscreteEnum<TEnum>

    result

    Remarks

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

    IntAverageConditional(DiscreteEnum<TEnum>, Discrete)

    EP message to Int.

    Declaration
    public static Discrete IntAverageConditional(DiscreteEnum<TEnum> Enum, Discrete result)
    Parameters
    Type Name Description
    DiscreteEnum<TEnum> Enum

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

    Discrete result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Discrete

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Enum is not a proper distribution.

    IntAverageConditionalInit(DiscreteEnum<TEnum>)

    Declaration
    public static Discrete IntAverageConditionalInit(DiscreteEnum<TEnum> Enum)
    Parameters
    Type Name Description
    DiscreteEnum<TEnum> Enum

    Incoming message from Enum.

    Returns
    Type Description
    Discrete
    Remarks

    IntAverageLogarithm(DiscreteEnum<TEnum>, Discrete)

    VMP message to Int.

    Declaration
    public static Discrete IntAverageLogarithm(DiscreteEnum<TEnum> Enum, Discrete result)
    Parameters
    Type Name Description
    DiscreteEnum<TEnum> Enum

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

    Discrete result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Discrete

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Enum is not a proper distribution.

    LogAverageFactor(Discrete, TEnum)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Discrete Int, TEnum Enum)
    Parameters
    Type Name Description
    Discrete Int

    Incoming message from Int.

    TEnum Enum

    Incoming message from Enum.

    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_(Int,Enum) p(Int,Enum) factor(Int,Enum)).

    LogAverageFactor(Discrete, DiscreteEnum<TEnum>, Discrete)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Discrete Int, DiscreteEnum<TEnum> Enum, Discrete to_Int)
    Parameters
    Type Name Description
    Discrete Int

    Incoming message from Int.

    DiscreteEnum<TEnum> Enum

    Incoming message from Enum.

    Discrete to_Int

    Outgoing message to Int.

    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_(Int,Enum) p(Int,Enum) factor(Int,Enum)).

    LogAverageFactor(Int32, TEnum)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(int Int, TEnum Enum)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    TEnum Enum

    Incoming message from Enum.

    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_(Enum) p(Enum) factor(Int,Enum)).

    LogAverageFactor(Int32, DiscreteEnum<TEnum>)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(int Int, DiscreteEnum<TEnum> Enum)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    DiscreteEnum<TEnum> Enum

    Incoming message from Enum.

    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_(Enum) p(Enum) factor(Int,Enum)).

    LogEvidenceRatio(Discrete)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Discrete Int)
    Parameters
    Type Name Description
    Discrete Int

    Incoming message from Int.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(Int) p(Int) factor(Int,Enum) / sum_Int p(Int) messageTo(Int)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Int32, TEnum)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(int Int, TEnum Enum)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    TEnum Enum

    Incoming message from Enum.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(Enum) p(Enum) factor(Int,Enum)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Int32, DiscreteEnum<TEnum>)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(int Int, DiscreteEnum<TEnum> Enum)
    Parameters
    Type Name Description
    Int32 Int

    Constant value for Int.

    DiscreteEnum<TEnum> Enum

    Incoming message from Enum.

    Returns
    Type Description
    Double

    Logarithm of the factor's contribution the EP model evidence.

    Remarks

    The formula for the result is log(sum_(Enum) p(Enum) factor(Int,Enum)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

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