Search Results for

    Show / Hide Table of Contents

    Class BetaFromMeanAndTotalCountOp

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

    Inheritance
    Object
    BetaFromMeanAndTotalCountOp
    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), "BetaFromMeanAndTotalCount", new Type[]{})]
    [Quality(QualityBand.Experimental)]
    public static class BetaFromMeanAndTotalCountOp

    Fields

    damping

    How much damping to use to avoid improper messages. A higher value implies more damping.

    Declaration
    public static double damping
    Field Value
    Type Description
    Double

    Methods

    AverageLogFactor(Double, Double, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(double prob, double mean, double totalCount)
    Parameters
    Type Name Description
    Double prob

    Constant value for prob.

    Double mean

    Constant value for mean.

    Double totalCount

    Constant value for totalCount.

    Returns
    Type Description
    Double

    Average of the factor's log-value across the given argument distributions.

    Remarks

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

    LogAverageFactor(Beta, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Beta prob, double mean, double totalCount)
    Parameters
    Type Name Description
    Beta prob

    Incoming message from prob.

    Double mean

    Constant value for mean.

    Double totalCount

    Constant value for totalCount.

    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_(prob) p(prob) factor(prob,mean,totalCount)).

    LogAverageFactor(Double, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double prob, double mean, double totalCount)
    Parameters
    Type Name Description
    Double prob

    Constant value for prob.

    Double mean

    Constant value for mean.

    Double totalCount

    Constant value for totalCount.

    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(prob,mean,totalCount)).

    MeanAverageConditional(Beta, Gamma, Beta, Beta)

    EP message to mean.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta MeanAverageConditional(Beta mean, Gamma totalCount, Beta prob, Beta result)
    Parameters
    Type Name Description
    Beta mean

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

    Gamma totalCount

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

    Beta prob

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

    Beta result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Beta

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    totalCount is not a proper distribution.

    ImproperMessageException

    prob is not a proper distribution.

    MeanAverageConditional(Beta, Gamma, Double, Beta)

    EP message to mean.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta MeanAverageConditional(Beta mean, Gamma totalCount, double prob, Beta result)
    Parameters
    Type Name Description
    Beta mean

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

    Gamma totalCount

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

    Double prob

    Constant value for prob.

    Beta result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Beta

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    totalCount is not a proper distribution.

    MeanAverageConditional(Beta, Double, Beta, Beta)

    EP message to mean.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta MeanAverageConditional(Beta mean, double totalCount, Beta prob, Beta result)
    Parameters
    Type Name Description
    Beta mean

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

    Double totalCount

    Constant value for totalCount.

    Beta prob

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

    Beta result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Beta

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    prob is not a proper distribution.

    MeanAverageConditional(Beta, Double, Double, Beta)

    EP message to mean.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta MeanAverageConditional(Beta mean, double totalCount, double prob, Beta result)
    Parameters
    Type Name Description
    Beta mean

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

    Double totalCount

    Constant value for totalCount.

    Double prob

    Constant value for prob.

    Beta result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Beta

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    MeanAverageLogarithm(Beta, Beta, Gamma, Beta)

    VMP message to mean.

    Declaration
    public static Beta MeanAverageLogarithm(Beta prob, Beta mean, Gamma totalCount, Beta to_mean)
    Parameters
    Type Name Description
    Beta prob

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

    Beta mean

    Incoming message from mean.

    Gamma totalCount

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

    Beta to_mean

    Previous outgoing message to mean.

    Returns
    Type Description
    Beta

    The outgoing VMP message to the mean argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except mean. The formula is exp(sum_(prob,totalCount) p(prob,totalCount) log(factor(prob,mean,totalCount))).

    Exceptions
    Type Condition
    ImproperMessageException

    prob is not a proper distribution.

    ImproperMessageException

    totalCount is not a proper distribution.

    MeanAverageLogarithm(Double, Beta, Gamma, Beta)

    VMP message to mean.

    Declaration
    public static Beta MeanAverageLogarithm(double prob, Beta mean, Gamma totalCount, Beta to_mean)
    Parameters
    Type Name Description
    Double prob

    Constant value for prob.

    Beta mean

    Incoming message from mean.

    Gamma totalCount

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

    Beta to_mean

    Previous outgoing message to mean.

    Returns
    Type Description
    Beta

    The outgoing VMP message to the mean argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except mean. The formula is exp(sum_(totalCount) p(totalCount) log(factor(prob,mean,totalCount))).

    Exceptions
    Type Condition
    ImproperMessageException

    totalCount is not a proper distribution.

    MeanAverageLogarithm(Double, Beta, Double, Beta)

    VMP message to mean.

    Declaration
    public static Beta MeanAverageLogarithm(double prob, Beta mean, double totalCount, Beta to_mean)
    Parameters
    Type Name Description
    Double prob

    Constant value for prob.

    Beta mean

    Incoming message from mean.

    Double totalCount

    Constant value for totalCount.

    Beta to_mean

    Previous outgoing message to mean.

    Returns
    Type Description
    Beta

    The outgoing VMP message to the mean argument.

    Remarks

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

    ProbAverageConditional(Beta, Gamma)

    EP message to prob.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta ProbAverageConditional(Beta mean, Gamma totalCount)
    Parameters
    Type Name Description
    Beta mean

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

    Gamma totalCount

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

    Returns
    Type Description
    Beta

    The outgoing EP message to the prob argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    totalCount is not a proper distribution.

    ProbAverageConditional(Beta, Double)

    EP message to prob.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta ProbAverageConditional(Beta mean, double totalCount)
    Parameters
    Type Name Description
    Beta mean

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

    Double totalCount

    Constant value for totalCount.

    Returns
    Type Description
    Beta

    The outgoing EP message to the prob argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ProbAverageConditional(Double, Gamma)

    EP message to prob.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Beta ProbAverageConditional(double mean, Gamma totalCount)
    Parameters
    Type Name Description
    Double mean

    Constant value for mean.

    Gamma totalCount

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

    Returns
    Type Description
    Beta

    The outgoing EP message to the prob argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    totalCount is not a proper distribution.

    ProbAverageConditional(Double, Double)

    EP message to prob.

    Declaration
    public static Beta ProbAverageConditional(double mean, double totalCount)
    Parameters
    Type Name Description
    Double mean

    Constant value for mean.

    Double totalCount

    Constant value for totalCount.

    Returns
    Type Description
    Beta

    The outgoing EP message to the prob argument.

    Remarks

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

    ProbAverageLogarithm(Beta, Gamma)

    VMP message to prob.

    Declaration
    public static Beta ProbAverageLogarithm(Beta mean, Gamma totalCount)
    Parameters
    Type Name Description
    Beta mean

    Incoming message from mean.

    Gamma totalCount

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

    Returns
    Type Description
    Beta

    The outgoing VMP message to the prob argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob. The formula is exp(sum_(mean,totalCount) p(mean,totalCount) log(factor(prob,mean,totalCount))).

    Exceptions
    Type Condition
    ImproperMessageException

    totalCount is not a proper distribution.

    ProbAverageLogarithm(Beta, Double)

    VMP message to prob.

    Declaration
    public static Beta ProbAverageLogarithm(Beta mean, double totalCount)
    Parameters
    Type Name Description
    Beta mean

    Incoming message from mean.

    Double totalCount

    Constant value for totalCount.

    Returns
    Type Description
    Beta

    The outgoing VMP message to the prob argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob. The formula is exp(sum_(mean) p(mean) log(factor(prob,mean,totalCount))).

    ProbAverageLogarithm(Double, Gamma)

    VMP message to prob.

    Declaration
    public static Beta ProbAverageLogarithm(double mean, Gamma totalCount)
    Parameters
    Type Name Description
    Double mean

    Constant value for mean.

    Gamma totalCount

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

    Returns
    Type Description
    Beta

    The outgoing VMP message to the prob argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except prob. The formula is exp(sum_(totalCount) p(totalCount) log(factor(prob,mean,totalCount))).

    Exceptions
    Type Condition
    ImproperMessageException

    totalCount is not a proper distribution.

    TotalCountAverageConditional(Beta, Gamma, Beta, Gamma)

    EP message to totalCount.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Gamma TotalCountAverageConditional(Beta mean, Gamma totalCount, Beta prob, Gamma result)
    Parameters
    Type Name Description
    Beta mean

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

    Gamma totalCount

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

    Beta prob

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

    Gamma result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Gamma

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    totalCount is not a proper distribution.

    ImproperMessageException

    prob is not a proper distribution.

    TotalCountAverageConditional(Beta, Gamma, Double, Gamma)

    EP message to totalCount.

    Declaration
    [NotSupported("Expectation Propagation does not currently support beta distributions with stochastic arguments.")]
    public static Gamma TotalCountAverageConditional(Beta mean, Gamma totalCount, double prob, Gamma result)
    Parameters
    Type Name Description
    Beta mean

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

    Gamma totalCount

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

    Double prob

    Constant value for prob.

    Gamma result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Gamma

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    totalCount is not a proper distribution.

    TotalCountAverageLogarithm(Beta, Gamma, Beta, Gamma)

    VMP message to totalCount.

    Declaration
    public static Gamma TotalCountAverageLogarithm(Beta mean, Gamma totalCount, Beta prob, Gamma to_totalCount)
    Parameters
    Type Name Description
    Beta mean

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

    Gamma totalCount

    Incoming message from totalCount.

    Beta prob

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

    Gamma to_totalCount

    Previous outgoing message to totalCount.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the totalCount argument.

    Remarks

    The outgoing message is the exponential of the average log-factor value, where the average is over all arguments except totalCount. The formula is exp(sum_(mean,prob) p(mean,prob) log(factor(prob,mean,totalCount))).

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    ImproperMessageException

    prob is not a proper distribution.

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