﻿Poisson Structure
 Poisson Structure
Microsoft Research
A Poisson distribution over the integers [0,infinity).

Namespace: MicrosoftResearch.Infer.Distributions
Assembly: Infer.Runtime (in Infer.Runtime.dll) Version: 2.6.41128.1 (2.6.41128.1)
Syntax
```[SerializableAttribute]
[Quality(QualityBand.Stable)]
public struct Poisson : IDistribution<int>,
ICloneable, HasPoint<int>, Diffable, SettableToUniform, CanGetLogProb<int>,
SettableTo<Poisson>, SettableToProduct<Poisson>, SettableToProduct<Poisson, Poisson>,
SettableToRatio<Poisson>, SettableToRatio<Poisson, Poisson>,
SettableToPower<Poisson>, SettableToWeightedSum<Poisson>, CanGetLogAverageOf<Poisson>,
CanGetLogAverageOfPower<Poisson>, CanGetAverageLog<Poisson>, Sampleable<int>,
CanGetMean<double>, CanGetVariance<double>, CanGetMeanAndVarianceOut<double, double>,
CanSetMeanAndVariance<double, double>```

The Poisson type exposes the following members.

Constructors
NameDescription
Poisson(Double)
Creates a Poisson distribution with the given mean.
Poisson(Poisson)
Copy constructor.
Poisson(Double, Double)
Create a Com-Poisson distribution with the given rate and precision.
Top
Methods
NameDescription
Clone
Clones this COM-Poisson.
FromMeanAndMeanLogFactorial
Create a COM-Poisson distribution with the given sufficient statistics.
GetAverageLog
Gets the expected logarithm of a COM-Poisson under this COM-Poisson.
GetLogAverageOf
Gets the log of the integral of the product of this COM-Poisson with another COM-Poisson.
GetLogAverageOfPower
Get the integral of this distribution times another distribution raised to a power.
GetLogNormalizer
Gets the log normalizer of the distribution
GetLogNormalizer(Double, Double)
Computes log(sum_{x=0..infinity} lambda^x / x!^nu)
GetLogPowerSum
Computes log(sum_{x=0..infinity} x^p lambda^x / x!^nu)
GetLogProb
Evaluates the log of of the density function of this COM-Poisson at the given value
GetMean
Gets the expected value E(x)
GetMeanAndVariance
Gets the mean and variance
GetMeanLogFactorial
Computes (sum_{x=0..infinity} log(x!) Rate^x / x!^Precision) / (sum_{x=0..infinity} Rate^x / x!^Precision )
GetSumLogFactorial
Computes sum_{x=0..infinity} log(x!) lambda^x / x!^nu
GetSumLogFactorial2
Computes sum_{x=0..infinity} log(x!)^2 lambda^x / x!^nu
GetSumXLogFactorial
Computes sum_{x=0..infinity} x log(x!) lambda^x / x!^nu
GetVariance
Gets the variance
IsProper
Asks whether this instance is proper or not. A COM-Poisson distribution is proper if Rate >= 0 and (Precision > 0 or (Precision == 0 and Rate < 1)).
IsUniform
Asks whether this instance is uniform
MaxDiff
Returns the maximum difference between the parameters of this COM-Poisson and another COM-Poisson
PointMass
Creates a Com-Poisson distribution which only allows one value.
Sample
Samples from a Poisson distribution
Sample(Double)
Samples from a Poisson distribution with given mean
Sample(Int32)
Sample from a Poisson - use Sample instead
Sample(Double, Double)
Samples from a COM-Poisson distribution
SetMeanAndVariance
Sets the mean and variance
SetTo
Sets this COM-Poisson instance to have the parameter values of another COM-Poisson instance
SetToPower
Sets the parameters to represent the power of a COM-Poisson to some exponent.
SetToProduct
Sets the parameters to represent the product of two COM-Poissons.
SetToRatio
Sets the parameters to represent the ratio of two COM-Poisson distributions
SetToSum
Set the parameters to match the moments of a mixture distribution.
SetToUniform
Sets this COM-Poisson instance to be a uniform distribution
Uniform
Instantiates a uniform Com-Poisson distribution
Top
Operators
NameDescription
Division
Creates a new Poisson which is the ratio of two other COM-Poissons
Equality
Equals operator
ExclusiveOr
Raises a COM-Poisson to a power.
Inequality
Not equals operator
Multiply
Creates a new COM-Poisson which is the product of two other COM-Poissons
Top
Fields
NameDescription
Precision
The precision parameter of the COM-Poisson distribution
Rate
The rate parameter of the COM-Poisson distribution, always >= 0.
Top
Properties
NameDescription
IsPointMass
Asks whether the instance is a point mass
Point
Sets/gets the instance as a point mass
Top
Remarks

The Poisson is often used as a distribution on counts. The formula for the distribution is p(x) = rate^x exp(-rate) / x! where rate is the rate parameter. In this implementation, we use a generalization called the Conway-Maxwell Poisson or "Com-Poisson", which has an extra precision parameter nu. The formula for the distribution is p(x) =propto rate^x / x!^nu. With this extension, we can represent a uniform distribution via (rate=1,nu=0) and a point mass via rate=0 or nu=infinity. This family is closed under multiplication, while the standard Poisson is not.