Search Results for

    Show / Hide Table of Contents

    Class DiscreteFromDiscreteOp

    Provides outgoing messages for Discrete(Int32, Matrix), given random arguments to the function.

    Inheritance
    Object
    DiscreteFromDiscreteOp
    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(new string[]{"sample", "selector", "probs"}, typeof(Factor), "Discrete", new Type[]{typeof(int), typeof(Matrix)})]
    [Quality(QualityBand.Experimental)]
    public static class DiscreteFromDiscreteOp

    Methods

    LogAverageFactor(Discrete, Discrete, Matrix)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Discrete sample, Discrete selector, Matrix probs)
    Parameters
    Type Name Description
    Discrete sample

    Incoming message from sample.

    Discrete selector

    Incoming message from selector.

    Matrix probs

    Constant value for probs.

    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_(sample,selector) p(sample,selector) factor(sample,selector,probs)).

    LogEvidenceRatio(Discrete, Discrete, Matrix)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Discrete sample, Discrete selector, Matrix probs)
    Parameters
    Type Name Description
    Discrete sample

    Incoming message from sample.

    Discrete selector

    Incoming message from selector.

    Matrix probs

    Constant value for probs.

    Returns
    Type Description
    Double

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

    Remarks

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

    SampleAverageConditional(Discrete, Matrix, Discrete)

    EP message to sample.

    Declaration
    public static Discrete SampleAverageConditional(Discrete selector, Matrix probs, Discrete result)
    Parameters
    Type Name Description
    Discrete selector

    Incoming message from selector.

    Matrix probs

    Constant value for probs.

    Discrete result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Discrete

    result

    Remarks

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

    SelectorAverageConditional(Discrete, Matrix, Discrete)

    EP message to selector.

    Declaration
    public static Discrete SelectorAverageConditional(Discrete sample, Matrix probs, Discrete result)
    Parameters
    Type Name Description
    Discrete sample

    Incoming message from sample.

    Matrix probs

    Constant value for probs.

    Discrete result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Discrete

    result

    Remarks

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

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