Search Results for

    Show / Hide Table of Contents

    Class PoissonOp

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

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

    Fields

    ForceProper

    Declaration
    public static bool ForceProper
    Field Value
    Type Description
    Boolean

    Methods

    AverageLogFactor(Poisson, Gamma)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Poisson sample, Gamma mean)
    Parameters
    Type Name Description
    Poisson sample

    Incoming message from sample.

    Gamma mean

    Incoming message from mean. 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,mean) p(sample,mean) log(factor(sample,mean)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    AverageLogFactor(Poisson, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(Poisson sample, double mean)
    Parameters
    Type Name Description
    Poisson sample

    Incoming message from sample.

    Double mean

    Constant value for mean.

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

    AverageLogFactor(Int32, Gamma)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(int sample, Gamma mean)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Gamma mean

    Incoming message from mean. 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_(mean) p(mean) log(factor(sample,mean)). Adding up these values across all factors and variables gives the log-evidence estimate for VMP.

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    AverageLogFactor(Int32, Double)

    Evidence message for VMP.

    Declaration
    public static double AverageLogFactor(int sample, double mean)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Double mean

    Constant value for mean.

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

    LogAverageFactor(Poisson, Gamma)

    Evidence message for EP.

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

    Incoming message from sample.

    Gamma mean

    Incoming message from mean.

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

    LogAverageFactor(Poisson, Double, Poisson)

    Evidence message for EP.

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

    Incoming message from sample.

    Double mean

    Constant value for mean.

    Poisson 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,mean)).

    LogAverageFactor(Int32, Gamma, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(int sample, Gamma mean, Gamma to_mean)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Gamma mean

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

    Gamma to_mean

    Outgoing message to mean.

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    LogAverageFactor(Int32, Double)

    Evidence message for EP.

    Declaration
    public static double LogAverageFactor(int sample, double mean)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Double mean

    Constant value for mean.

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

    LogEvidenceRatio(Poisson, Gamma, Poisson)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Poisson sample, Gamma mean, Poisson to_sample)
    Parameters
    Type Name Description
    Poisson sample

    Incoming message from sample.

    Gamma mean

    Incoming message from mean.

    Poisson to_sample

    Previous outgoing message to sample.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Poisson, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(Poisson sample, double mean)
    Parameters
    Type Name Description
    Poisson sample

    Incoming message from sample.

    Double mean

    Constant value for mean.

    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,mean) / sum_sample p(sample) messageTo(sample)). Adding up these values across all factors and variables gives the log-evidence estimate for EP.

    LogEvidenceRatio(Int32, Gamma, Gamma)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(int sample, Gamma mean, Gamma to_mean)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Gamma mean

    Incoming message from mean.

    Gamma to_mean

    Outgoing message to mean.

    Returns
    Type Description
    Double

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

    Remarks

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

    LogEvidenceRatio(Int32, Double)

    Evidence message for EP.

    Declaration
    public static double LogEvidenceRatio(int sample, double mean)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Double mean

    Constant value for mean.

    Returns
    Type Description
    Double

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

    Remarks

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

    MeanAverageConditional(Poisson, Gamma)

    EP message to mean.

    Declaration
    public static Gamma MeanAverageConditional(Poisson sample, Gamma mean)
    Parameters
    Type Name Description
    Poisson sample

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

    Gamma mean

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

    Returns
    Type Description
    Gamma

    The outgoing EP message to the mean argument.

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    ImproperMessageException

    mean is not a proper distribution.

    MeanAverageConditional(Int32)

    EP message to mean.

    Declaration
    public static Gamma MeanAverageConditional(int sample)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Returns
    Type Description
    Gamma

    The outgoing EP message to the mean argument.

    Remarks

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

    MeanAverageLogarithm(Poisson)

    VMP message to mean.

    Declaration
    public static Gamma MeanAverageLogarithm(Poisson sample)
    Parameters
    Type Name Description
    Poisson sample

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

    Returns
    Type Description
    Gamma

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

    Exceptions
    Type Condition
    ImproperMessageException

    sample is not a proper distribution.

    MeanAverageLogarithm(Int32)

    VMP message to mean.

    Declaration
    public static Gamma MeanAverageLogarithm(int sample)
    Parameters
    Type Name Description
    Int32 sample

    Constant value for sample.

    Returns
    Type Description
    Gamma

    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.

    SampleAverageConditional(Poisson, Gamma)

    EP message to sample.

    Declaration
    public static Poisson SampleAverageConditional(Poisson sample, Gamma mean)
    Parameters
    Type Name Description
    Poisson sample

    Incoming message from sample.

    Gamma mean

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

    Returns
    Type Description
    Poisson

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    SampleAverageConditional(Double)

    EP message to sample.

    Declaration
    public static Poisson SampleAverageConditional(double mean)
    Parameters
    Type Name Description
    Double mean

    Constant value for mean.

    Returns
    Type Description
    Poisson

    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.

    SampleAverageLogarithm(Gamma)

    VMP message to sample.

    Declaration
    public static Poisson SampleAverageLogarithm(Gamma mean)
    Parameters
    Type Name Description
    Gamma mean

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

    Returns
    Type Description
    Poisson

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

    Exceptions
    Type Condition
    ImproperMessageException

    mean is not a proper distribution.

    SampleAverageLogarithm(Double)

    VMP message to sample.

    Declaration
    public static Poisson SampleAverageLogarithm(double mean)
    Parameters
    Type Name Description
    Double mean

    Constant value for mean.

    Returns
    Type Description
    Poisson

    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.

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