Class PoissonOp
Provides outgoing messages for Poisson(Double), given random arguments to the function.
Inherited Members
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 |
Gamma | mean | Incoming message from |
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 |
|
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 |
Double | mean | Constant value for |
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 |
Gamma | mean | Incoming message from |
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 |
|
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 |
Double | mean | Constant value for |
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 |
Gamma | mean | Incoming message from |
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 |
Double | mean | Constant value for |
Poisson | to_sample | Outgoing message to |
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 |
Gamma | mean | Incoming message from |
Gamma | to_mean | Outgoing message to |
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 |
|
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 |
Double | mean | Constant value for |
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 |
Gamma | mean | Incoming message from |
Poisson | to_sample | Previous outgoing message to |
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 |
Double | mean | Constant value for |
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 |
Gamma | mean | Incoming message from |
Gamma | to_mean | Outgoing message to |
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 |
Double | mean | Constant value for |
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 |
Gamma | mean | Incoming message from |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
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 |
|
ImproperMessageException |
|
MeanAverageConditional(Int32)
EP message to mean
.
Declaration
public static Gamma MeanAverageConditional(int sample)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sample | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing EP message to the |
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 |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
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 |
|
MeanAverageLogarithm(Int32)
VMP message to mean
.
Declaration
public static Gamma MeanAverageLogarithm(int sample)
Parameters
Type | Name | Description |
---|---|---|
Int32 | sample | Constant value for |
Returns
Type | Description |
---|---|
Gamma | The outgoing VMP message to the |
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 |
Gamma | mean | Incoming message from |
Returns
Type | Description |
---|---|
Poisson | The outgoing EP message to the |
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 |
|
SampleAverageConditional(Double)
EP message to sample
.
Declaration
public static Poisson SampleAverageConditional(double mean)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Returns
Type | Description |
---|---|
Poisson | The outgoing EP message to the |
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 |
Returns
Type | Description |
---|---|
Poisson | The outgoing VMP message to the |
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 |
|
SampleAverageLogarithm(Double)
VMP message to sample
.
Declaration
public static Poisson SampleAverageLogarithm(double mean)
Parameters
Type | Name | Description |
---|---|---|
Double | mean | Constant value for |
Returns
Type | Description |
---|---|
Poisson | The outgoing VMP message to the |
Remarks
The outgoing message is the factor viewed as a function of sample
conditioned on the given values.