Search Results for

    Show / Hide Table of Contents

    Class StringOfLengthOp

    Provides outgoing messages for StringOfLength(Int32, DiscreteChar), given random arguments to the function.

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

    Methods

    LengthAverageConditional(StringDistribution, DiscreteChar, Discrete)

    EP message to length.

    Declaration
    public static Discrete LengthAverageConditional(StringDistribution str, DiscreteChar allowedChars, Discrete result)
    Parameters
    Type Name Description
    StringDistribution str

    Incoming message from str.

    DiscreteChar allowedChars

    Constant value for allowedChars.

    Discrete result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Discrete

    result

    Remarks

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

    LogEvidenceRatio(DiscreteChar, Discrete, StringDistribution)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(DiscreteChar allowedChars, Discrete length, StringDistribution str)
    Parameters
    Type Name Description
    DiscreteChar allowedChars

    Constant value for allowedChars.

    Discrete length

    Incoming message from length.

    StringDistribution str

    Incoming message from str.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(DiscreteChar, Discrete, String)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(DiscreteChar allowedChars, Discrete length, string str)
    Parameters
    Type Name Description
    DiscreteChar allowedChars

    Constant value for allowedChars.

    Discrete length

    Incoming message from length.

    String str

    Constant value for str.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(DiscreteChar, Int32, String)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(DiscreteChar allowedChars, int length, string str)
    Parameters
    Type Name Description
    DiscreteChar allowedChars

    Constant value for allowedChars.

    Int32 length

    Constant value for length.

    String str

    Constant value for str.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(str,length,allowedChars)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    StrAverageConditional(DiscreteChar, Discrete)

    EP message to str.

    Declaration
    public static StringDistribution StrAverageConditional(DiscreteChar allowedChars, Discrete length)
    Parameters
    Type Name Description
    DiscreteChar allowedChars

    Constant value for allowedChars.

    Discrete length

    Incoming message from length.

    Returns
    Type Description
    StringDistribution

    The outgoing EP message to the str argument.

    Remarks

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

    StrAverageConditional(DiscreteChar, Int32)

    EP message to str.

    Declaration
    public static StringDistribution StrAverageConditional(DiscreteChar allowedChars, int length)
    Parameters
    Type Name Description
    DiscreteChar allowedChars

    Constant value for allowedChars.

    Int32 length

    Constant value for length.

    Returns
    Type Description
    StringDistribution

    The outgoing EP message to the str argument.

    Remarks

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

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