Search Results for

    Show / Hide Table of Contents

    Class GammaSoftmaxOp

    Provides outgoing messages for Softmax(IList<Double>), given random arguments to the function.

    Inheritance
    Object
    GammaSoftmaxOp
    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(MMath), "Softmax", new Type[]{typeof(IList<double>)})]
    [Quality(QualityBand.Experimental)]
    public static class GammaSoftmaxOp
    Remarks

    Here the marginal prototype for logOdds is Gamma, which allows for heavier tailed distributions. This implementation uses the Taylor series bound from Blei 06, followed by optimization using LBFGS. This approach is linear in the dimension K.

    Methods

    GetMeanLog(IList<Gamma>)

    Declaration
    public static Vector GetMeanLog(IList<Gamma> x)
    Parameters
    Type Name Description
    IList<Gamma> x

    Incoming message from 'x'.

    Returns
    Type Description
    Vector
    Remarks

    SoftmaxAverageLogarithm(IList<Gamma>)

    VMP message to softmax.

    Declaration
    public static Dirichlet SoftmaxAverageLogarithm([SkipIfAllUniform] IList<Gamma> x)
    Parameters
    Type Name Description
    IList<Gamma> x

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

    Returns
    Type Description
    Dirichlet

    The outgoing VMP message to the softmax argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    XAverageLogarithm<GammaList>(Dirichlet, GammaList, GammaList)

    VMP message to x.

    Declaration
    public static GammaList XAverageLogarithm<GammaList>(Dirichlet softmax, [SkipIfAllUniform] GammaList x, GammaList result)
        where GammaList : IList<Gamma>
    Parameters
    Type Name Description
    Dirichlet softmax

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

    GammaList x

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

    GammaList result

    Modified to contain the outgoing message.

    Returns
    Type Description
    GammaList

    result

    Type Parameters
    Name Description
    GammaList

    The type of the incoming message from x and the outgoing message.

    Remarks

    The outgoing message is the factor viewed as a function of x with softmax integrated out. The formula is sum_softmax p(softmax) factor(softmax,x).

    Exceptions
    Type Condition
    ImproperMessageException

    softmax is not a proper distribution.

    ImproperMessageException

    x is not a proper distribution.

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