Search Results for

    Show / Hide Table of Contents

    Class VariableOp

    Provides outgoing messages for the following factors:

    • Variable<T>(T, out T)
    • VariableInit<T>(T, T, out T)
    , given random arguments to the function.

    Inheritance
    Object
    VariableOp
    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(Clone), "Variable<>", new Type[]{}, Default = true)]
    [FactorMethod(typeof(Clone), "VariableInit<>", new Type[]{}, Default = true)]
    [Quality(QualityBand.Preview)]
    public static class VariableOp

    Methods

    DefAverageConditional<T>(T)

    EP message to def.

    Declaration
    public static T DefAverageConditional<T>(T use)
    Parameters
    Type Name Description
    T use

    Incoming message from use.

    Returns
    Type Description
    T

    The outgoing EP message to the def argument.

    Type Parameters
    Name Description
    T

    The type of the marginal of the variable.

    Remarks

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

    LogEvidenceRatio<T>(T)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio<T>(T use)
    Parameters
    Type Name Description
    T use

    Incoming message from use.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    T
    Remarks

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

    MarginalAverageConditional<T>(T, T, T)

    EP message to marginal.

    Declaration
    [SkipIfAllUniform]
    public static T MarginalAverageConditional<T>(T use, T def, T result)
        where T : SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    T use

    Incoming message from use.

    T def

    Incoming message from def.

    T result

    Modified to contain the outgoing message.

    Returns
    Type Description
    T

    result

    Type Parameters
    Name Description
    T

    The type of the marginal of the variable.

    Remarks

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

    MarginalAverageConditionalInit<T>(T)

    Declaration
    public static T MarginalAverageConditionalInit<T>(T def)
        where T : ICloneable
    Parameters
    Type Name Description
    T def

    Incoming message from def.

    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the marginal of the variable.

    Remarks

    UseAverageConditional<T>(T)

    EP message to use.

    Declaration
    public static T UseAverageConditional<T>(T Def)
    Parameters
    Type Name Description
    T Def

    Incoming message from def.

    Returns
    Type Description
    T

    The outgoing EP message to the use argument.

    Type Parameters
    Name Description
    T

    The type of the marginal of the variable.

    Remarks

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

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