Search Results for

    Show / Hide Table of Contents

    Class WishartFromShapeAndRateOp

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

    Inheritance
    Object
    WishartFromShapeAndRateOp
    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(Wishart), "SampleFromShapeAndRate", new Type[]{typeof(double), typeof(PositiveDefiniteMatrix)})]
    [Quality(QualityBand.Stable)]
    public static class WishartFromShapeAndRateOp

    Methods

    AverageLogFactor(Wishart, Double, Wishart)

    Evidence message for VMP.

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

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

    Double shape

    Constant value for shape.

    Wishart rate

    Incoming message from rate. Must be a proper distribution. If any element is 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,rate) p(sample,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

    rate is not a proper distribution.

    AverageLogFactor(PositiveDefiniteMatrix, Double, PositiveDefiniteMatrix)

    Evidence message for VMP.

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

    Constant value for sample.

    Double shape

    Constant value for shape.

    PositiveDefiniteMatrix 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.

    LogAverageFactor(Wishart, Wishart)

    Evidence message for EP.

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

    Incoming message from sample.

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

    Evidence message for EP.

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

    Constant value for sample.

    Double shape

    Constant value for shape.

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

    Evidence message for EP.

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

    Constant value for sample.

    Double shape

    Constant value for shape.

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

    Evidence message for EP.

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

    Incoming message from sample.

    Double shape

    Constant value for shape.

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

    Evidence message for EP.

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

    Constant value for sample.

    Double shape

    Constant value for shape.

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

    Evidence message for EP.

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

    Constant value for sample.

    Double shape

    Constant value for shape.

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

    EP message to rate.

    Declaration
    public static Wishart RateAverageConditional(PositiveDefiniteMatrix sample, double shape, Wishart result)
    Parameters
    Type Name Description
    PositiveDefiniteMatrix sample

    Constant value for sample.

    Double shape

    Constant value for shape.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

    RateAverageLogarithm(Wishart, Double, Wishart)

    VMP message to rate.

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

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

    Double shape

    Constant value for shape.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    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.

    SampleAverageConditional(Double, PositiveDefiniteMatrix, Wishart)

    EP message to sample.

    Declaration
    public static Wishart SampleAverageConditional(double shape, PositiveDefiniteMatrix rate, Wishart result)
    Parameters
    Type Name Description
    Double shape

    Constant value for shape.

    PositiveDefiniteMatrix rate

    Constant value for rate.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

    SampleAverageLogarithm(Double, Wishart, Wishart)

    VMP message to sample.

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

    Constant value for shape.

    Wishart rate

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

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    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, PositiveDefiniteMatrix, Wishart)

    VMP message to sample.

    Declaration
    public static Wishart SampleAverageLogarithm(double shape, PositiveDefiniteMatrix rate, Wishart result)
    Parameters
    Type Name Description
    Double shape

    Constant value for shape.

    PositiveDefiniteMatrix rate

    Constant value for rate.

    Wishart result

    Modified to contain the outgoing message.

    Returns
    Type Description
    Wishart

    result

    Remarks

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

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