Search Results for

    Show / Hide Table of Contents

    Class StringsAreEqualOp

    Provides outgoing messages for AreEqual(String, String), given random arguments to the function.

    Inheritance
    Object
    StringsAreEqualOp
    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(Factor), "AreEqual", new Type[]{typeof(string), typeof(string)})]
    [Quality(QualityBand.Experimental)]
    public static class StringsAreEqualOp

    Methods

    AreEqualAverageConditional(StringDistribution, StringDistribution)

    EP message to areEqual.

    Declaration
    public static Bernoulli AreEqualAverageConditional(StringDistribution str1, StringDistribution str2)
    Parameters
    Type Name Description
    StringDistribution str1

    Incoming message from str1.

    StringDistribution str2

    Incoming message from str2.

    Returns
    Type Description
    Bernoulli

    The outgoing EP message to the areEqual argument.

    Remarks

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

    LogAverageFactor(Boolean, StringDistribution, StringDistribution)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(bool areEqual, StringDistribution str1, StringDistribution str2)
    Parameters
    Type Name Description
    Boolean areEqual

    Constant value for areEqual.

    StringDistribution str1

    Incoming message from str1.

    StringDistribution str2

    Incoming message from str2.

    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_(str1,str2) p(str1,str2) factor(areEqual,str1,str2)).

    LogEvidenceRatio(Bernoulli)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Bernoulli areEqual)
    Parameters
    Type Name Description
    Bernoulli areEqual

    Incoming message from areEqual.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Boolean, StringDistribution, StringDistribution)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(bool areEqual, StringDistribution str1, StringDistribution str2)
    Parameters
    Type Name Description
    Boolean areEqual

    Constant value for areEqual.

    StringDistribution str1

    Incoming message from str1.

    StringDistribution str2

    Incoming message from str2.

    Returns
    Type Description
    Double

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

    Remarks

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

    Str1AverageConditional(StringDistribution, Bernoulli, StringDistribution)

    EP message to str1.

    Declaration
    public static StringDistribution Str1AverageConditional(StringDistribution str2, Bernoulli areEqual, StringDistribution result)
    Parameters
    Type Name Description
    StringDistribution str2

    Incoming message from str2.

    Bernoulli areEqual

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

    StringDistribution result

    Modified to contain the outgoing message.

    Returns
    Type Description
    StringDistribution

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    areEqual is not a proper distribution.

    Str2AverageConditional(StringDistribution, Bernoulli, StringDistribution)

    EP message to str2.

    Declaration
    public static StringDistribution Str2AverageConditional(StringDistribution str1, Bernoulli areEqual, StringDistribution result)
    Parameters
    Type Name Description
    StringDistribution str1

    Incoming message from str1.

    Bernoulli areEqual

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

    StringDistribution result

    Modified to contain the outgoing message.

    Returns
    Type Description
    StringDistribution

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    areEqual is not a proper distribution.

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