Search Results for

    Show / Hide Table of Contents

    Class UsesEqualDefOp

    Provides outgoing messages for UsesEqualDef<T>(T, Int32, out T), given random arguments to the function.

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

    Methods

    DefAverageConditional<T>(IReadOnlyList<T>, T)

    Declaration
    public static T DefAverageConditional<T>([SkipIfAllUniform] IReadOnlyList<T> Uses, T result)
        where T : SettableToProduct<T>, SettableTo<T>, SettableToUniform
    Parameters
    Type Name Description
    IReadOnlyList<T> Uses
    T result
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the messages.

    LogEvidenceRatio<T>(IList<T>, T, IList<T>)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio<T>([SkipIfAllUniform] IList<T> Uses, T Def, IList<T> to_Uses)
        where T : CanGetLogAverageOf<T>, SettableToProduct<T>, SettableTo<T>, ICloneable, SettableToUniform
    Parameters
    Type Name Description
    IList<T> Uses

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

    T Def

    Incoming message from Def.

    IList<T> to_Uses

    Outgoing message to Uses.

    Returns
    Type Description
    Double

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

    Type Parameters
    Name Description
    T

    The type of the messages.

    Remarks

    The formula for the result is log(sum_(Uses,Def) p(Uses,Def) factor(Uses,Def,count,Marginal) / sum_Uses p(Uses) messageTo(Uses)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    Exceptions
    Type Condition
    ImproperMessageException

    Uses is not a proper distribution.

    LogEvidenceRatio1<T>(IList<T>, T)

    Evidence message for EP

    Declaration
    public static double LogEvidenceRatio1<T>([SkipIfAllUniform] IList<T> Uses, T Def)
        where T : CanGetLogAverageOf<T>, SettableToProduct<T>, SettableTo<T>, ICloneable, SettableToUniform
    Parameters
    Type Name Description
    IList<T> Uses

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

    T Def

    Incoming message from 'Def'.

    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_(Uses,Def) p(Uses,Def) factor(Uses,Def,Marginal) / sum_Uses p(Uses) messageTo(Uses)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    Exceptions
    Type Condition
    ImproperMessageException

    Uses is not a proper distribution

    MarginalAverageConditional<T>(T[], T, T)

    EP message to Marginal.

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

    Incoming message from Uses.

    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 messages.

    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_(Uses,Def) p(Uses,Def) factor(Uses,Def,count,Marginal)]/p(Marginal).

    MarginalAverageConditional<T>(IReadOnlyList<T>, T, T)

    Declaration
    public static T MarginalAverageConditional<T>(IReadOnlyList<T> Uses, T Def, T result)
        where T : SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    IReadOnlyList<T> Uses
    T Def
    T result
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the messages.

    UsesAverageConditional<T>(T[], T, Int32, T)

    EP message to Uses.

    Declaration
    public static T UsesAverageConditional<T>(T[] Uses, [SkipIfAllUniform] T Def, int resultIndex, T result)
        where T : SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    T[] Uses

    Incoming message from Uses.

    T Def

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

    Int32 resultIndex

    Index of the Uses for which a message is desired.

    T result

    Modified to contain the outgoing message.

    Returns
    Type Description
    T

    result

    Type Parameters
    Name Description
    T

    The type of the messages.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    Def is not a proper distribution.

    UsesAverageConditional<T>(IReadOnlyList<T>, T, Int32, T)

    Declaration
    public static T UsesAverageConditional<T>(IReadOnlyList<T> Uses, [SkipIfAllUniform] T Def, int resultIndex, T result)
        where T : SettableToProduct<T>, SettableTo<T>
    Parameters
    Type Name Description
    IReadOnlyList<T> Uses
    T Def
    Int32 resultIndex
    T result
    Returns
    Type Description
    T
    Type Parameters
    Name Description
    T

    The type of the messages.

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