Search Results for

    Show / Hide Table of Contents

    Class LogisticOp_SJ99

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

    Inheritance
    Object
    LogisticOp_SJ99
    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), "Logistic", new Type[]{typeof(double)}, Default = true)]
    [Quality(QualityBand.Preview)]
    [Buffers(new string[]{"A"})]
    public class LogisticOp_SJ99
    Remarks

    Uses the Saul and Jordan (1999) bound \langle log(1+exp(x)) \rangle \leq a^2*v/2 + log(1+exp(m+(1-2a)v/2))

    Fields

    global_step

    Declaration
    public static double global_step
    Field Value
    Type Description
    Double

    Methods

    A(Gaussian, Double)

    Update the buffer A.

    Declaration
    public static double A(Gaussian x, double a)
    Parameters
    Type Name Description
    Gaussian x

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

    Double a

    Buffer a.

    Returns
    Type Description
    Double

    New value of buffer A.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    AInit()

    Initialize the buffer A.

    Declaration
    public static double AInit()
    Returns
    Type Description
    Double

    Initial value of buffer A.

    Remarks

    AverageLogFactor(Beta, Gaussian, Beta, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Beta logistic, Gaussian x, Beta to_logistic, double a)
    Parameters
    Type Name Description
    Beta logistic

    Incoming message from logistic.

    Gaussian x

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

    Beta to_logistic

    Previous outgoing message to logistic.

    Double a

    Buffer a.

    Returns
    Type Description
    Double

    Zero.

    Remarks

    In Variational Message Passing, the evidence contribution of a deterministic factor is zero. Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    LogisticAverageLogarithm(Gaussian, Double)

    VMP message to logistic.

    Declaration
    public static Beta LogisticAverageLogarithm(Gaussian x, double a)
    Parameters
    Type Name Description
    Gaussian x

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

    Double a

    Buffer a.

    Returns
    Type Description
    Beta

    The outgoing VMP message to the logistic argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    LogisticInit()

    Initialize the buffer logistic.

    Declaration
    public static Beta LogisticInit()
    Returns
    Type Description
    Beta

    Initial value of buffer logistic.

    Remarks

    logSumExpBound(Double, Double, Double)

    Declaration
    public static double logSumExpBound(double m, double v, double a)
    Parameters
    Type Name Description
    Double m
    Double v
    Double a
    Returns
    Type Description
    Double

    XAverageLogarithm(Beta, Gaussian, Gaussian, Double)

    VMP message to x.

    Declaration
    public static Gaussian XAverageLogarithm(Beta logistic, Gaussian x, Gaussian to_x, double a)
    Parameters
    Type Name Description
    Beta logistic

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

    Gaussian x

    Incoming message from x.

    Gaussian to_x

    Previous outgoing message to x.

    Double a

    Buffer a.

    Returns
    Type Description
    Gaussian

    The outgoing VMP message to the x argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    logistic is not a proper distribution.

    XInit()

    Initialize the buffer x.

    Declaration
    public static Gaussian XInit()
    Returns
    Type Description
    Gaussian

    Initial value of buffer x.

    Remarks

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