Search Results for

    Show / Hide Table of Contents

    Class GammaFromShapeAndRateOpBase

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

    Inheritance
    Object
    GammaFromShapeAndRateOpBase
    GammaFromShapeAndRateOp
    GammaFromShapeAndRateOp_Laplace
    GammaFromShapeAndRateOp_Slow
    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
    public class GammaFromShapeAndRateOpBase

    Methods

    AverageLogFactor(Gamma, Gamma, Gamma)

    Evidence message for VMP.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static double AverageLogFactor(Gamma sample, Gamma shape, Gamma rate)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Gamma rate

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

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is sum_(sample,shape,rate) p(sample,shape,rate) log(factor(sample,shape,rate)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    AverageLogFactor(Gamma, Double, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Gamma sample, double shape, double rate)
    Parameters
    Type Name Description
    Gamma sample

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

    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is sum_(sample) p(sample) log(factor(sample,shape,rate)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    AverageLogFactor(Double, Double, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(double sample, double shape, double rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    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(sample,shape,rate)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    CalculateDerivatives(Gamma)

    Calculate derivatives of \int G(x;a,b) LogGamma(x) dx wrt (a,b)

    Declaration
    public static Vector CalculateDerivatives(Gamma q)
    Parameters
    Type Name Description
    Gamma q

    The Gamma distribution G(x;a,b).

    Returns
    Type Description
    Vector

    A 2-vector containing derivatives of \int G(x;a,b) LogGamma(x) dx wrt (a,b).

    Remarks

    Calculates expectations in x=log(s) space using Gauss-Hermite quadrature. For each integral the behaviour as x->0 is subtracted from the integrand before performing quadrature to remove the singularity there.

    CalculateDerivativesNaive(Gamma)

    Declaration
    public static Vector CalculateDerivativesNaive(Gamma q)
    Parameters
    Type Name Description
    Gamma q
    Returns
    Type Description
    Vector

    CalculateDerivativesTrapezoid(Gamma)

    Declaration
    public static Vector CalculateDerivativesTrapezoid(Gamma q)
    Parameters
    Type Name Description
    Gamma q
    Returns
    Type Description
    Vector

    ELogGamma(Gamma)

    Calculates \int G(x;a,b) LogGamma(x) dx

    Declaration
    public static double ELogGamma(Gamma q)
    Parameters
    Type Name Description
    Gamma q

    G(x;a,b)

    Returns
    Type Description
    Double

    \int G(x;a,b) LogGamma(x) dx

    LogAverageFactor(Gamma, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gamma sample, Gamma to_sample)
    Parameters
    Type Name Description
    Gamma sample

    Incoming message from sample.

    Gamma to_sample

    Outgoing message to sample.

    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_(sample) p(sample) factor(sample,shape,rate)).

    LogAverageFactor(Gamma, Gamma, Gamma)

    Evidence message for EP.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static double LogAverageFactor(Gamma sample, Gamma shape, Gamma rate)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Gamma rate

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

    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_(sample,shape,rate) p(sample,shape,rate) factor(sample,shape,rate)).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    LogAverageFactor(Gamma, Gamma, Double)

    Evidence message for EP.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static double LogAverageFactor(Gamma sample, Gamma shape, double rate)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Double rate

    Constant value for rate.

    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_(sample,shape) p(sample,shape) factor(sample,shape,rate)).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    LogAverageFactor(Gamma, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(Gamma sample, double shape, double rate)
    Parameters
    Type Name Description
    Gamma sample

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

    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    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_(sample) p(sample) factor(sample,shape,rate)).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    LogAverageFactor(Double, Gamma, Gamma)

    Evidence message for EP.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static double LogAverageFactor(double sample, Gamma shape, Gamma rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gamma shape

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

    Gamma rate

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

    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_(shape,rate) p(shape,rate) factor(sample,shape,rate)).

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    LogAverageFactor(Double, Gamma, Double)

    Evidence message for EP.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static double LogAverageFactor(double sample, Gamma shape, double rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gamma shape

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

    Double rate

    Constant value for rate.

    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_(shape) p(shape) factor(sample,shape,rate)).

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    LogAverageFactor(Double, Double, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double sample, double shape, Gamma rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Gamma rate

    Incoming message from rate.

    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_(rate) p(rate) factor(sample,shape,rate)).

    LogAverageFactor(Double, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(double sample, double shape, double rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    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(sample,shape,rate)).

    LogEvidenceRatio(Gamma, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Gamma sample, double shape, double rate)
    Parameters
    Type Name Description
    Gamma sample

    Incoming message from sample.

    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Double, Double, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double sample, double shape, Gamma rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Gamma rate

    Incoming message from rate.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Double, Double, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(double sample, double shape, double rate)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Double

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

    Remarks

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

    RateAverageConditional(Gamma, Gamma)

    EP message to rate.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma RateAverageConditional(Gamma sample, Gamma shape)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Returns
    Type Description
    Gamma

    The outgoing EP message to the rate argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    RateAverageConditional(Double, Double)

    EP message to rate.

    Declaration
    public static Gamma RateAverageConditional(double sample, double shape)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the rate argument.

    Remarks

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

    RateAverageLogarithm(Gamma, Gamma)

    VMP message to rate.

    Declaration
    public static Gamma RateAverageLogarithm(Gamma sample, Gamma shape)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the rate argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    RateAverageLogarithm(Gamma, Double)

    VMP message to rate.

    Declaration
    public static Gamma RateAverageLogarithm(Gamma sample, double shape)
    Parameters
    Type Name Description
    Gamma sample

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

    Double shape

    Constant value for shape.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the rate argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    RateAverageLogarithm(Double, Gamma)

    VMP message to rate.

    Declaration
    public static Gamma RateAverageLogarithm(double sample, Gamma shape)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gamma shape

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

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the rate argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    RateAverageLogarithm(Double, Double)

    VMP message to rate.

    Declaration
    public static Gamma RateAverageLogarithm(double sample, double shape)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the rate argument.

    Remarks

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

    SampleAverageConditional(Gamma, Gamma)

    EP message to sample.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma SampleAverageConditional(Gamma shape, Gamma rate)
    Parameters
    Type Name Description
    Gamma shape

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

    Gamma rate

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

    Returns
    Type Description
    Gamma

    The outgoing EP message to the sample argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    SampleAverageConditional(Gamma, Double)

    EP message to sample.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma SampleAverageConditional(Gamma shape, double rate)
    Parameters
    Type Name Description
    Gamma shape

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

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the sample argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    SampleAverageConditional(Double, Double)

    EP message to sample.

    Declaration
    public static Gamma SampleAverageConditional(double shape, double rate)
    Parameters
    Type Name Description
    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the sample argument.

    Remarks

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

    SampleAverageConditionalInit()

    Declaration
    public static Gamma SampleAverageConditionalInit()
    Returns
    Type Description
    Gamma
    Remarks

    SampleAverageLogarithm(Gamma, Gamma)

    VMP message to sample.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Gamma SampleAverageLogarithm(Gamma shape, Gamma rate)
    Parameters
    Type Name Description
    Gamma shape

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

    Gamma rate

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

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the sample argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    SampleAverageLogarithm(Gamma, Double)

    VMP message to sample.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Gamma SampleAverageLogarithm(Gamma shape, double rate)
    Parameters
    Type Name Description
    Gamma shape

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

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the sample argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    SampleAverageLogarithm(Double, Gamma)

    VMP message to sample.

    Declaration
    public static Gamma SampleAverageLogarithm(double shape, Gamma rate)
    Parameters
    Type Name Description
    Double shape

    Constant value for shape.

    Gamma rate

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

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the sample argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    rate is not a proper distribution.

    SampleAverageLogarithm(Double, Double)

    VMP message to sample.

    Declaration
    public static Gamma SampleAverageLogarithm(double shape, double rate)
    Parameters
    Type Name Description
    Double shape

    Constant value for shape.

    Double rate

    Constant value for rate.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the sample argument.

    Remarks

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

    ShapeAverageConditional(Gamma, Gamma, Gamma, Gamma)

    EP message to shape.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma ShapeAverageConditional(Gamma sample, Gamma shape, Gamma rate, Gamma result)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Gamma rate

    Incoming message from rate. 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 shape as the random arguments are varied. The formula is proj[p(shape) sum_(sample,rate) p(sample,rate) factor(sample,shape,rate)]/p(shape).

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    ShapeAverageConditional(Gamma, Gamma, Double, Gamma)

    EP message to shape.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma ShapeAverageConditional(Gamma sample, Gamma shape, double rate, Gamma result)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Double rate

    Constant value for rate.

    Gamma result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Gamma

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    ShapeAverageConditional(Double, Gamma, Gamma, Gamma)

    EP message to shape.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma ShapeAverageConditional(double sample, Gamma shape, Gamma rate, Gamma result)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gamma shape

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

    Gamma rate

    Incoming message from rate. 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 shape as the random arguments are varied. The formula is proj[p(shape) sum_(rate) p(rate) factor(sample,shape,rate)]/p(shape).

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    ShapeAverageConditional(Double, Gamma, Double, Gamma)

    EP message to shape.

    Declaration
    [NotSupported("Expectation Propagation does not support Gamma variables with stochastic shape")]
    public static Gamma ShapeAverageConditional(double sample, Gamma shape, double rate, Gamma result)
    Parameters
    Type Name Description
    Double sample

    Constant value for sample.

    Gamma shape

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

    Double rate

    Constant value for rate.

    Gamma result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Gamma

    result

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    shape is not a proper distribution.

    ShapeAverageLogarithm(Gamma, Gamma, Gamma, Gamma)

    VMP message to shape.

    Declaration
    [Quality(QualityBand.Experimental)]
    public static Gamma ShapeAverageLogarithm(Gamma sample, Gamma shape, Gamma rate, Gamma to_shape)
    Parameters
    Type Name Description
    Gamma sample

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

    Gamma shape

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

    Gamma rate

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

    Gamma to_shape

    Previous outgoing message to shape.

    Returns
    Type Description
    Gamma

    The outgoing VMP message to the shape argument.

    Remarks

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    shape is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

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