Search Results for

    Show / Hide Table of Contents

    Class LogisticOp

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

    Inheritance
    Object
    LogisticOp
    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)})]
    [Quality(QualityBand.Stable)]
    [Buffers(new string[]{"falseMsg"})]
    public class LogisticOp

    Methods

    AverageLogFactor(Gaussian, Beta, Beta)

    Evidence message for VMP.

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

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

    Beta logistic

    Incoming message from logistic.

    Beta to_logistic

    Previous outgoing message to logistic.

    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.

    AverageLogFactor(Double, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(double logistic, double x)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    Double x

    Constant value for x.

    Returns
    Type Description
    Double

    Zero.

    Remarks

    The formula for the result is log(factor(logistic,x)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    FalseMsg(Beta, Gaussian, Gaussian)

    Update the buffer falseMsg.

    Declaration
    public static Gaussian FalseMsg(Beta logistic, Gaussian x, Gaussian falseMsg)
    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. Must be a proper distribution. If uniform, the result will be uniform.

    Gaussian falseMsg

    Buffer falseMsg.

    Returns
    Type Description
    Gaussian

    New value of buffer falseMsg.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    logistic is not a proper distribution.

    ImproperMessageException

    x is not a proper distribution.

    FalseMsgInit()

    Initialize the buffer falseMsg.

    Declaration
    public static Gaussian FalseMsgInit()
    Returns
    Type Description
    Gaussian

    Initial value of buffer falseMsg.

    Remarks

    LogAverageFactor(Beta, Gaussian, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Beta logistic, Gaussian x, Gaussian falseMsg)
    Parameters
    Type Name Description
    Beta logistic

    Incoming message from logistic.

    Gaussian x

    Incoming message from x.

    Gaussian falseMsg

    Buffer falseMsg.

    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_(logistic,x) p(logistic,x) factor(logistic,x)).

    LogAverageFactor(Beta, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Beta logistic, double x)
    Parameters
    Type Name Description
    Beta logistic

    Incoming message from logistic.

    Double x

    Constant value for x.

    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_(logistic) p(logistic) factor(logistic,x)).

    LogAverageFactor(Double, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double logistic, Gaussian x)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    Gaussian x

    Incoming message from x.

    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_(x) p(x) factor(logistic,x)).

    LogAverageFactor(Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double logistic, double x)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    Double x

    Constant value for x.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(logistic,x)).

    LogEvidenceRatio(Beta, Gaussian, Gaussian, Beta)

    Evidence message for EP.

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

    Incoming message from logistic.

    Gaussian x

    Incoming message from x.

    Gaussian falseMsg

    Buffer falseMsg.

    Beta to_logistic

    Outgoing message to logistic.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Double, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double logistic, Gaussian x)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    Gaussian x

    Incoming message from x.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(x) p(x) factor(logistic,x)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double logistic, double x)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    Double x

    Constant value for x.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(factor(logistic,x)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogisticAverageConditional(Beta, Gaussian, Gaussian, Gaussian)

    EP message to logistic.

    Declaration
    public static Beta LogisticAverageConditional(Beta logistic, Gaussian x, Gaussian falseMsg, Gaussian to_x)
    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.

    Gaussian falseMsg

    Buffer falseMsg.

    Gaussian to_x

    Previous outgoing message to x.

    Returns
    Type Description
    Beta

    The outgoing EP 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[p(logistic) sum_(x) p(x) factor(logistic,x)]/p(logistic).

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    LogisticAverageConditionalInit()

    Declaration
    public static Beta LogisticAverageConditionalInit()
    Returns
    Type Description
    Beta
    Remarks

    LogisticAverageLogarithm(Gaussian)

    VMP message to logistic.

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

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

    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.

    XAverageConditional(Beta, Gaussian)

    EP message to x.

    Declaration
    public static Gaussian XAverageConditional(Beta logistic, Gaussian falseMsg)
    Parameters
    Type Name Description
    Beta logistic

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

    Gaussian falseMsg

    Buffer falseMsg.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the x argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    logistic is not a proper distribution.

    XAverageConditional(Double)

    EP message to x.

    Declaration
    public static Gaussian XAverageConditional(double logistic)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    Returns
    Type Description
    Gaussian

    The outgoing EP message to the x argument.

    Remarks

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

    XAverageLogarithm(Beta, Gaussian, Gaussian)

    VMP message to x.

    Declaration
    public static Gaussian XAverageLogarithm(Beta logistic, Gaussian x, Gaussian to_X)
    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. Must be a proper distribution. If uniform, the result will be uniform.

    Gaussian to_X

    Previous outgoing message to X.

    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.

    ImproperMessageException

    x is not a proper distribution.

    XAverageLogarithm(Double)

    VMP message to x.

    Declaration
    public static Gaussian XAverageLogarithm(double logistic)
    Parameters
    Type Name Description
    Double logistic

    Constant value for logistic.

    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 conditioned on the given values.

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