Search Results for

    Show / Hide Table of Contents

    Class DirichletSymmetricOp

    Provides outgoing messages for DirichletSymmetric(Int32, Double), given random arguments to the function.

    Inheritance
    Object
    DirichletSymmetricOp
    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), "DirichletSymmetric", new Type[]{})]
    [Quality(QualityBand.Preview)]
    [Buffers(new string[]{"probMeanLog"})]
    public static class DirichletSymmetricOp

    Methods

    AlphaAverageConditional(Gamma, Dirichlet, Gamma)

    EP message to alpha.

    Declaration
    [NotSupported("Expectation Propagation does not currently support Dirichlet distributions with stochastic arguments")]
    public static Gamma AlphaAverageConditional(Gamma alpha, Dirichlet prob, Gamma result)
    Parameters
    Type Name Description
    Gamma alpha

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

    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Gamma result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Gamma

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    ImproperMessageException

    prob is not a proper distribution.

    AlphaAverageLogarithm(Dirichlet, ConjugateDirichlet, Vector)

    VMP message to alpha.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static ConjugateDirichlet AlphaAverageLogarithm(Dirichlet prob, ConjugateDirichlet alpha, Vector probMeanLog)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    ConjugateDirichlet alpha

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

    Vector probMeanLog

    Buffer probMeanLog.

    Returns
    Type Description
    ConjugateDirichlet

    The outgoing VMP message to the alpha argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except alpha. The formula is exp(sum_(prob) p(prob) log(factor(prob,K,alpha))).

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    ImproperMessageException

    alpha is not a proper distribution.

    AlphaAverageLogarithm(Dirichlet, Gamma, Vector, Gamma)

    VMP message to alpha.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Gamma AlphaAverageLogarithm(Dirichlet prob, Gamma alpha, Vector probMeanLog, Gamma to_Alpha)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Gamma alpha

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

    Vector probMeanLog

    Buffer probMeanLog.

    Gamma to_Alpha

    Previous outgoing message to Alpha.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the alpha argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except alpha. The formula is exp(sum_(prob) p(prob) log(factor(prob,K,alpha))).

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    ImproperMessageException

    alpha is not a proper distribution.

    AlphaAverageLogarithm(Vector, ConjugateDirichlet, Vector)

    VMP message to alpha.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static ConjugateDirichlet AlphaAverageLogarithm(Vector prob, ConjugateDirichlet alpha, Vector probMeanLog)
    Parameters
    Type Name Description
    Vector prob

    Constant value for prob.

    ConjugateDirichlet alpha

    Incoming message from alpha.

    Vector probMeanLog

    Buffer probMeanLog.

    Returns
    Type Description
    ConjugateDirichlet

    The outgoing VMP message to the alpha argument.

    Remarks

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

    AlphaAverageLogarithm(Vector, Gamma, Gamma)

    VMP message to alpha.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Gamma AlphaAverageLogarithm(Vector prob, Gamma alpha, Gamma to_Alpha)
    Parameters
    Type Name Description
    Vector prob

    Constant value for prob.

    Gamma alpha

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

    Gamma to_Alpha

    Previous outgoing message to Alpha.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the alpha argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    AverageLogFactor(Dirichlet, ConjugateDirichlet)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static double AverageLogFactor(Dirichlet prob, ConjugateDirichlet alpha)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    ConjugateDirichlet alpha

    Incoming message from alpha.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(prob,alpha) p(prob,alpha) log(factor(prob,K,alpha)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    AverageLogFactor(Dirichlet, Gamma, Vector)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static double AverageLogFactor(Dirichlet prob, Gamma alpha, Vector probMeanLog)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Gamma alpha

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

    Vector probMeanLog

    Buffer probMeanLog.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(prob,alpha) p(prob,alpha) log(factor(prob,K,alpha)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    ImproperMessageException

    alpha is not a proper distribution.

    AverageLogFactor(Dirichlet, Double, Vector)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Stable)]
    public static double AverageLogFactor(Dirichlet prob, double alpha, Vector probMeanLog)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Double alpha

    Constant value for alpha.

    Vector probMeanLog

    Buffer probMeanLog.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(prob) p(prob) log(factor(prob,K,alpha)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    AverageLogFactor(Vector, ConjugateDirichlet)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static double AverageLogFactor(Vector prob, ConjugateDirichlet alpha)
    Parameters
    Type Name Description
    Vector prob

    Constant value for prob.

    ConjugateDirichlet alpha

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

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(alpha) p(alpha) log(factor(prob,K,alpha)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    AverageLogFactor(Vector, Gamma)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static double AverageLogFactor(Vector prob, Gamma alpha)
    Parameters
    Type Name Description
    Vector prob

    Constant value for prob.

    Gamma alpha

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

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(alpha) p(alpha) log(factor(prob,K,alpha)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    AverageLogFactor(IList<Double>, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(IList<double> prob, double alpha)
    Parameters
    Type Name Description
    IList<Double> prob

    Incoming message from prob.

    Double alpha

    Constant value for alpha.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

    The formula for the result is sum_(prob) p(prob) log(factor(prob,K,alpha)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    LogAverageFactor(Dirichlet, Gamma)

    Evidence message for EP.

    Declaration
    [NotSupported("Expectation Propagation does not currently support Dirichlet distributions with stochastic arguments")]
    public static double LogAverageFactor(Dirichlet prob, Gamma alpha)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob. Must be a proper distribution. If any element is uniform, the result will be uniform.

    Gamma alpha

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

    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_(prob,alpha) p(prob,alpha) factor(prob,K,alpha)).

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    ImproperMessageException

    alpha is not a proper distribution.

    LogAverageFactor(Dirichlet, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Dirichlet prob, double alpha)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob.

    Double alpha

    Constant value for alpha.

    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_(prob) p(prob) factor(prob,K,alpha)).

    LogAverageFactor(IList<Double>, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(IList<double> prob, double alpha)
    Parameters
    Type Name Description
    IList<Double> prob

    Incoming message from prob.

    Double alpha

    Constant value for alpha.

    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_(prob) p(prob) factor(prob,K,alpha)).

    LogEvidenceRatio(Dirichlet, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Dirichlet prob, double alpha)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob.

    Double alpha

    Constant value for alpha.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(prob) p(prob) factor(prob,K,alpha) / sum_prob p(prob) messageTo(prob)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(IList<Double>, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(IList<double> prob, double alpha)
    Parameters
    Type Name Description
    IList<Double> prob

    Incoming message from prob.

    Double alpha

    Constant value for alpha.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(prob) p(prob) factor(prob,K,alpha) / sum_prob p(prob) messageTo(prob)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    ProbAverageConditional(Gamma, Dirichlet)

    EP message to prob.

    Declaration
    [NotSupported("Expectation Propagation does not currently support Dirichlet distributions with stochastic arguments")]
    public static Dirichlet ProbAverageConditional(Gamma alpha, Dirichlet result)
    Parameters
    Type Name Description
    Gamma alpha

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

    Dirichlet result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Dirichlet

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    ProbAverageConditional(Double, Dirichlet)

    EP message to prob.

    Declaration
    public static Dirichlet ProbAverageConditional(double alpha, Dirichlet result)
    Parameters
    Type Name Description
    Double alpha

    Constant value for alpha.

    Dirichlet result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Dirichlet

    result

    Remarks

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

    ProbAverageConditionalInit(Int32)

    Declaration
    public static Dirichlet ProbAverageConditionalInit(int K)
    Parameters
    Type Name Description
    Int32 K

    Constant value for K.

    Returns
    Type Description
    Dirichlet
    Remarks

    ProbAverageLogarithm(ConjugateDirichlet, Dirichlet)

    VMP message to prob.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Dirichlet ProbAverageLogarithm(ConjugateDirichlet alpha, Dirichlet result)
    Parameters
    Type Name Description
    ConjugateDirichlet alpha

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

    Dirichlet result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Dirichlet

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob. The formula is exp(sum_(alpha) p(alpha) log(factor(prob,K,alpha))).

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    ProbAverageLogarithm(Gamma, Dirichlet)

    VMP message to prob.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Dirichlet ProbAverageLogarithm(Gamma alpha, Dirichlet result)
    Parameters
    Type Name Description
    Gamma alpha

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

    Dirichlet result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Dirichlet

    result

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob. The formula is exp(sum_(alpha) p(alpha) log(factor(prob,K,alpha))).

    Exceptions
    Type Condition
    ImproperMessageException

    alpha is not a proper distribution.

    ProbAverageLogarithm(Double, Dirichlet)

    VMP message to prob.

    Declaration
    [Quality(QualityBand.Stable)]
    public static Dirichlet ProbAverageLogarithm(double alpha, Dirichlet result)
    Parameters
    Type Name Description
    Double alpha

    Constant value for alpha.

    Dirichlet result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Dirichlet

    result

    Remarks

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

    ProbAverageLogarithmInit(Int32)

    Declaration
    public static Dirichlet ProbAverageLogarithmInit(int K)
    Parameters
    Type Name Description
    Int32 K

    Constant value for K.

    Returns
    Type Description
    Dirichlet
    Remarks

    ProbMeanLog(Dirichlet, Vector)

    Update the buffer probMeanLog.

    Declaration
    public static Vector ProbMeanLog(Dirichlet prob, Vector result)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob.

    Vector result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Vector

    result

    Remarks

    ProbMeanLog(Vector, Vector)

    Update the buffer probMeanLog.

    Declaration
    public static Vector ProbMeanLog(Vector prob, Vector result)
    Parameters
    Type Name Description
    Vector prob

    Constant value for prob.

    Vector result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Vector

    result

    Remarks

    ProbMeanLogInit(Dirichlet)

    Initialize the buffer probMeanLog.

    Declaration
    public static Vector ProbMeanLogInit(Dirichlet prob)
    Parameters
    Type Name Description
    Dirichlet prob

    Incoming message from prob.

    Returns
    Type Description
    Vector

    Initial value of buffer probMeanLog.

    Remarks

    ProbMeanLogInit(Vector)

    Initialize the buffer probMeanLog.

    Declaration
    public static Vector ProbMeanLogInit(Vector prob)
    Parameters
    Type Name Description
    Vector prob

    Constant value for prob.

    Returns
    Type Description
    Vector

    Initial value of buffer probMeanLog.

    Remarks

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