Search Results for

    Show / Hide Table of Contents

    Class GammaFromShapeAndRateOp_Laplace

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

    Inheritance
    Object
    GammaFromShapeAndRateOpBase
    GammaFromShapeAndRateOp_Laplace
    Inherited Members
    GammaFromShapeAndRateOpBase.LogAverageFactor(Double, Double, Double)
    GammaFromShapeAndRateOpBase.LogEvidenceRatio(Double, Double, Double)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Gamma, Gamma)
    GammaFromShapeAndRateOpBase.LogEvidenceRatio(Gamma, Double, Double)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Double, Double, Gamma)
    GammaFromShapeAndRateOpBase.LogEvidenceRatio(Double, Double, Gamma)
    GammaFromShapeAndRateOpBase.SampleAverageConditional(Double, Double)
    GammaFromShapeAndRateOpBase.RateAverageConditional(Double, Double)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Gamma, Double, Double)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Gamma, Gamma, Gamma)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Gamma, Gamma, Double)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Double, Gamma, Gamma)
    GammaFromShapeAndRateOpBase.LogAverageFactor(Double, Gamma, Double)
    GammaFromShapeAndRateOpBase.SampleAverageConditional(Gamma, Gamma)
    GammaFromShapeAndRateOpBase.SampleAverageConditionalInit()
    GammaFromShapeAndRateOpBase.SampleAverageConditional(Gamma, Double)
    GammaFromShapeAndRateOpBase.RateAverageConditional(Gamma, Gamma)
    GammaFromShapeAndRateOpBase.ShapeAverageConditional(Gamma, Gamma, Double, Gamma)
    GammaFromShapeAndRateOpBase.ShapeAverageConditional(Double, Gamma, Gamma, Gamma)
    GammaFromShapeAndRateOpBase.ShapeAverageConditional(Double, Gamma, Double, Gamma)
    GammaFromShapeAndRateOpBase.ShapeAverageConditional(Gamma, Gamma, Gamma, Gamma)
    GammaFromShapeAndRateOpBase.AverageLogFactor(Double, Double, Double)
    GammaFromShapeAndRateOpBase.AverageLogFactor(Gamma, Gamma, Gamma)
    GammaFromShapeAndRateOpBase.AverageLogFactor(Gamma, Double, Double)
    GammaFromShapeAndRateOpBase.SampleAverageLogarithm(Gamma, Gamma)
    GammaFromShapeAndRateOpBase.SampleAverageLogarithm(Gamma, Double)
    GammaFromShapeAndRateOpBase.SampleAverageLogarithm(Double, Gamma)
    GammaFromShapeAndRateOpBase.SampleAverageLogarithm(Double, Double)
    GammaFromShapeAndRateOpBase.RateAverageLogarithm(Gamma, Gamma)
    GammaFromShapeAndRateOpBase.RateAverageLogarithm(Double, Gamma)
    GammaFromShapeAndRateOpBase.RateAverageLogarithm(Gamma, Double)
    GammaFromShapeAndRateOpBase.RateAverageLogarithm(Double, Double)
    GammaFromShapeAndRateOpBase.ShapeAverageLogarithm(Gamma, Gamma, Gamma, Gamma)
    GammaFromShapeAndRateOpBase.CalculateDerivatives(Gamma)
    GammaFromShapeAndRateOpBase.CalculateDerivativesTrapezoid(Gamma)
    GammaFromShapeAndRateOpBase.CalculateDerivativesNaive(Gamma)
    GammaFromShapeAndRateOpBase.ELogGamma(Gamma)
    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), "GammaFromShapeAndRate", new Type[]{}, Default = false)]
    [Buffers(new string[]{"Q"})]
    [Quality(QualityBand.Experimental)]
    public class GammaFromShapeAndRateOp_Laplace : GammaFromShapeAndRateOpBase

    Methods

    LogAverageFactor(Gamma, Double, Gamma, Gamma)

    Evidence message for EP.

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

    Incoming message from sample.

    Double shape

    Constant value for shape.

    Gamma rate

    Incoming message from rate.

    Gamma q

    Buffer q.

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

    LogEvidenceRatio(Gamma, Double, Gamma, Gamma, Gamma)

    Evidence message for EP.

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

    Incoming message from sample.

    Double shape

    Constant value for shape.

    Gamma rate

    Incoming message from rate.

    Gamma to_sample

    Previous outgoing message to sample.

    Gamma q

    Buffer q.

    Returns
    Type Description
    Double

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

    Remarks

    The formula for the result is log(sum_(sample,rate) p(sample,rate) 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.

    Q(Gamma, Double, Gamma)

    Update the buffer Q.

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

    Incoming message from sample.

    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

    New value of buffer Q.

    Remarks

    Exceptions
    Type Condition
    ImproperMessageException

    rate is not a proper distribution.

    QInit()

    Initialize the buffer Q.

    Declaration
    public static Gamma QInit()
    Returns
    Type Description
    Gamma

    Initial value of buffer Q.

    Remarks

    RateAverageConditional(Gamma, Double, Gamma, Gamma)

    EP message to rate.

    Declaration
    public static Gamma RateAverageConditional(Gamma sample, double shape, Gamma rate, Gamma q)
    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.

    Gamma rate

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

    Gamma q

    Buffer q.

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    rate is not a proper distribution.

    SampleAverageConditional(Gamma, Double, Gamma, Gamma)

    EP message to sample.

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

    Incoming message from sample.

    Double shape

    Constant value for shape.

    Gamma rate

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

    Gamma q

    Buffer q.

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

    Exceptions
    Type Condition
    ImproperMessageException

    rate is not a proper distribution.

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