Search Results for

    Show / Hide Table of Contents

    Class IsPositiveOp

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

    Inheritance
    Object
    IsPositiveOp
    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), "IsPositive", new Type[]{typeof(double)})]
    [Quality(QualityBand.Mature)]
    public static class IsPositiveOp

    Methods

    AverageLogFactor(Bernoulli, Gaussian, Gaussian)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Preview)]
    public static double AverageLogFactor(Bernoulli isPositive, Gaussian X, Gaussian to_X)
    Parameters
    Type Name Description
    Bernoulli isPositive

    Incoming message from isPositive.

    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
    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(TruncatedGaussian)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Preview)]
    public static double AverageLogFactor(TruncatedGaussian X)
    Parameters
    Type Name Description
    TruncatedGaussian X

    Incoming message from x.

    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.

    AverageLogFactor(Boolean, Gaussian, Gaussian)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Preview)]
    public static double AverageLogFactor(bool isPositive, Gaussian x, Gaussian to_X)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    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
    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(Boolean, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(bool isPositive, double x)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    Double x

    Constant value for x.

    Returns
    Type Description
    Double

    Zero.

    Remarks

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

    AverageLogFactor_helper(Gaussian, Gaussian)

    Evidence message for VMP

    Declaration
    [Quality(QualityBand.Preview)]
    public static double AverageLogFactor_helper(Gaussian X, Gaussian to_X)
    Parameters
    Type Name Description
    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
    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

    IsPositiveAverageConditional(Gaussian)

    EP message to isPositive.

    Declaration
    public static Bernoulli IsPositiveAverageConditional(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
    Bernoulli

    The outgoing EP message to the isPositive argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    IsPositiveAverageConditionalInit()

    Declaration
    public static Bernoulli IsPositiveAverageConditionalInit()
    Returns
    Type Description
    Bernoulli
    Remarks

    IsPositiveAverageLogarithm(Gaussian)

    VMP message to isPositive.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Bernoulli IsPositiveAverageLogarithm(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
    Bernoulli

    The outgoing VMP message to the isPositive argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    LogAverageFactor(Bernoulli, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Bernoulli isPositive, Gaussian x)
    Parameters
    Type Name Description
    Bernoulli isPositive

    Incoming message from isPositive.

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

    LogAverageFactor(Boolean, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(bool isPositive, Gaussian x)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    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(isPositive,x)).

    LogAverageFactor(Boolean, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(bool isPositive, double x)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    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(isPositive,x)).

    LogEvidenceRatio(Bernoulli, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Bernoulli isPositive, Gaussian x)
    Parameters
    Type Name Description
    Bernoulli isPositive

    Incoming message from isPositive.

    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_(isPositive,x) p(isPositive,x) factor(isPositive,x) / sum_isPositive p(isPositive) messageTo(isPositive)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Boolean, Gaussian)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(bool isPositive, Gaussian x)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    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(isPositive,x)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Boolean, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(bool isPositive, double x)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    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(isPositive,x)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    XAverageConditional(Bernoulli)

    EP message to x.

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGaussian XAverageConditional(Bernoulli isPositive)
    Parameters
    Type Name Description
    Bernoulli isPositive

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

    Returns
    Type Description
    TruncatedGaussian

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

    Exceptions
    Type Condition
    ImproperMessageException

    isPositive is not a proper distribution.

    XAverageConditional(Bernoulli, Gaussian)

    EP message to x.

    Declaration
    public static Gaussian XAverageConditional(Bernoulli isPositive, Gaussian x)
    Parameters
    Type Name Description
    Bernoulli isPositive

    Incoming message from isPositive. 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.

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

    Exceptions
    Type Condition
    ImproperMessageException

    isPositive is not a proper distribution.

    ImproperMessageException

    x is not a proper distribution.

    XAverageConditional(Bernoulli, Double)

    EP message to x.

    Declaration
    public static Gaussian XAverageConditional(Bernoulli isPositive, double x)
    Parameters
    Type Name Description
    Bernoulli isPositive

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

    Double x

    Constant value for x.

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

    Exceptions
    Type Condition
    ImproperMessageException

    isPositive is not a proper distribution.

    XAverageConditional(Boolean)

    EP message to x.

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGaussian XAverageConditional(bool isPositive)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    Returns
    Type Description
    TruncatedGaussian

    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.

    XAverageConditional(Boolean, Gaussian)

    EP message to x.

    Declaration
    public static Gaussian XAverageConditional(bool isPositive, Gaussian x)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    Gaussian x

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

    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.

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

    XAverageConditional_Helper(Bernoulli, Gaussian, Boolean)

    Declaration
    public static Gaussian XAverageConditional_Helper(Bernoulli isPositive, Gaussian x, bool forceProper)
    Parameters
    Type Name Description
    Bernoulli isPositive
    Gaussian x
    Boolean forceProper
    Returns
    Type Description
    Gaussian

    XAverageConditionalInit()

    Declaration
    public static Gaussian XAverageConditionalInit()
    Returns
    Type Description
    Gaussian
    Remarks

    XAverageLogarithm(Bernoulli, Gaussian, Gaussian)

    VMP message to x.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Gaussian XAverageLogarithm(Bernoulli isPositive, Gaussian x, Gaussian to_X)
    Parameters
    Type Name Description
    Bernoulli isPositive

    Incoming message from isPositive. 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 isPositive integrated out. The formula is sum_isPositive p(isPositive) factor(isPositive,x).

    Exceptions
    Type Condition
    ImproperMessageException

    isPositive is not a proper distribution.

    ImproperMessageException

    x is not a proper distribution.

    XAverageLogarithm(Boolean)

    VMP message to x.

    Declaration
    [Quality(QualityBand.Preview)]
    public static TruncatedGaussian XAverageLogarithm(bool isPositive)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

    Returns
    Type Description
    TruncatedGaussian

    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.

    XAverageLogarithm(Boolean, Gaussian, Gaussian)

    VMP message to x.

    Declaration
    [Quality(QualityBand.Preview)]
    public static Gaussian XAverageLogarithm(bool isPositive, Gaussian x, Gaussian to_X)
    Parameters
    Type Name Description
    Boolean isPositive

    Constant value for isPositive.

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

    Exceptions
    Type Condition
    ImproperMessageException

    x is not a proper distribution.

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