Search Results for

    Show / Hide Table of Contents

    Class SoftmaxOp_KM11_Sparse2

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

    Inheritance
    Object
    SoftmaxOp_KM11_Sparse2
    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.Preview)]
    [Buffers(new string[]{"Asj", "Abouchard"})]
    public static class SoftmaxOp_KM11_Sparse2
    Remarks

    This implementation uses a generalization of the tilted bound used in Saul Jordan 1999, followed by nonconjugate VMP. This approach is linear in the dimension K.

    Methods

    Abouchard<GaussianList>(GaussianList, Double)

    Update the buffer Abouchard.

    Declaration
    public static double Abouchard<GaussianList>(GaussianList x, double abouchard)
        where GaussianList : IList<Gaussian>
    Parameters
    Type Name Description
    GaussianList x

    Incoming message from x.

    Double abouchard

    Buffer abouchard.

    Returns
    Type Description
    Double

    New value of buffer Abouchard.

    Type Parameters
    Name Description
    GaussianList

    The type of the incoming message from x.

    Remarks

    AbouchardInit()

    Initialize the buffer Abouchard.

    Declaration
    public static double AbouchardInit()
    Returns
    Type Description
    Double

    Initial value of buffer Abouchard.

    Remarks

    Asj(IList<Gaussian>, IList<Double>)

    Update the buffer Asj.

    Declaration
    public static IList<double> Asj(IList<Gaussian> x, IList<double> asj)
    Parameters
    Type Name Description
    IList<Gaussian> x

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

    IList<Double> asj

    Buffer asj.

    Returns
    Type Description
    IList<Double>

    New value of buffer Asj.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    AsjInit(IList<Gaussian>)

    Initialize the buffer Asj.

    Declaration
    public static IList<double> AsjInit(IList<Gaussian> x)
    Parameters
    Type Name Description
    IList<Gaussian> x

    Incoming message from x.

    Returns
    Type Description
    IList<Double>

    Initial value of buffer Asj.

    Remarks

    LogAverageFactor<GaussianList>(GaussianList, IList<Double>, Double, Dirichlet, Dirichlet)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor<GaussianList>([SkipIfAllUniform] GaussianList x, IList<double> asj, double abouchard, Dirichlet softmax, Dirichlet to_softmax)
        where GaussianList : IList<Gaussian>
    Parameters
    Type Name Description
    GaussianList x

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

    IList<Double> asj

    Buffer asj.

    Double abouchard

    Buffer abouchard.

    Dirichlet softmax

    Incoming message from softmax.

    Dirichlet to_softmax

    Previous outgoing message to softmax.

    Returns
    Type Description
    Double

    Logarithm of the factor's average value across the given argument distributions.

    Type Parameters
    Name Description
    GaussianList

    The type of the incoming message from x.

    Remarks

    The formula for the result is log(sum_(x,softmax) p(x,softmax) factor(softmax,x)).

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    SoftmaxAverageLogarithm<GaussianList>(GaussianList, IList<Double>, Double, Dirichlet, Dirichlet)

    VMP message to softmax.

    Declaration
    public static Dirichlet SoftmaxAverageLogarithm<GaussianList>([SkipIfAllUniform] GaussianList x, IList<double> asj, double abouchard, Dirichlet softmax, Dirichlet to_softmax)
        where GaussianList : IList<Gaussian>
    Parameters
    Type Name Description
    GaussianList x

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

    IList<Double> asj

    Buffer asj.

    Double abouchard

    Buffer abouchard.

    Dirichlet softmax

    Incoming message from softmax.

    Dirichlet to_softmax

    Previous outgoing message to softmax.

    Returns
    Type Description
    Dirichlet

    The outgoing VMP message to the softmax argument.

    Type Parameters
    Name Description
    GaussianList

    The type of the incoming message from x.

    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<GaussianList>(GaussianList, IList<Double>, Double, Dirichlet, Dirichlet, GaussianList)

    VMP message to x.

    Declaration
    public static GaussianList XAverageLogarithm<GaussianList>([SkipIfAllUniform] GaussianList x, IList<double> asj, double abouchard, Dirichlet softmax, Dirichlet to_softmax, GaussianList to_x)
        where GaussianList : IList<Gaussian>
    Parameters
    Type Name Description
    GaussianList x

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

    IList<Double> asj

    Buffer asj.

    Double abouchard

    Buffer abouchard.

    Dirichlet softmax

    Incoming message from softmax.

    Dirichlet to_softmax

    Previous outgoing message to softmax.

    GaussianList to_x

    Previous outgoing message to x.

    Returns
    Type Description
    GaussianList

    The outgoing VMP message to the x argument.

    Type Parameters
    Name Description
    GaussianList

    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

    x is not a proper distribution.

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