liveBook · Manning

Poisson distribution

As explained in Ensemble Methods for Machine Learning

A Poisson distribution is a discrete probability distribution for the number of events occurring in a fixed interval under a constant-rate event process.

The Poisson distribution models discrete count-valued targets. It is useful when the prediction is a number of occurrences rather than a continuous measurement: count labels have a different spread and shape from continuous labels, so a regression model built around a normal-distribution assumption may fit them poorly. section 7.1.2

Figure 7.4 Poisson regression (left) fits count-valued targets by assuming that the spread of the targets can be modeled by the discrete-valued Poisson distribution (right). More precisely, Poisson regression assumes that the predictions f(x) for an example x are distributed according to the Poisson distribution.
CH07_F04_Kunapuli

This view contrasts the discrete spread assumed for count predictions with the continuous spread used by ordinary linear regression. section 7.1.2

In Poisson regression, the distribution assumption is paired with a log-link function. Instead of connecting features directly to the target with a linear equation, the model relates the log of the target to a linear combination of features; equivalently, the predicted count is obtained by exponentiating that linear combination. The distribution choice and the link function together adapt the general linear-regression framework to count data. section 7.1.2 section 7.5

The same assumption also determines how prediction errors are learned. Loss functions can be derived from an assumed residual distribution; for count-valued labels, the Poisson likelihood supplies the corresponding objective. Optimizing a negative log-likelihood can have the same final modeling effect when a direct loss expression is inconvenient. section 7.3.1

Choose a distribution by matching the target type rather than treating every regression task alike:

  • Use a normal-distribution assumption for ordinary continuous targets; it underlies classical linear and ridge regression. section 7.1.2
  • Use a Poisson assumption with a log link for count variables. section 7.4.2
  • Consider gamma regression for positive, right-skewed continuous targets, or Tweedie regression for compound distributions. section 7.5

Predicting bike-rental counts

Counts of casual bike users provide a practical target for Poisson regression. A scikit-learn PoissonRegressor uses L2 regularization through alpha; grid search and cross-validation can tune it alongside ridge and Tweedie alternatives. In the reported comparison, the Poisson model achieved lower test MSE and MAE than the ridge baseline, while a stacked GLM ensemble improved further. section 7.4.2

Poisson regression is one generalized linear model (GLM) variant. TweedieRegressor with power set to 1 is equivalent to PoissonRegressor. For nonlinear modeling that retains distribution and link-function choices, LightGBM and XGBoost support Poisson, gamma, and Tweedie distributions. section 7.4.2 section 7.5

How Ensemble Methods for Machine Learning covers it

How deep it goes
Explains the discrete count assumption, log-link formulation, likelihood-based loss, and library implementation without formal proofs.
Examples
Uses casual bike-user counts and compares Poisson, Tweedie, ridge, and stacked regressors.
What it assumes
Builds on linear regression and regression targets while introducing count-label assumptions and the log link.
What you can do after
Apply it via scikit-learn PoissonRegressor with regularization, grid search, cross-validation, and regression metrics.
How it connects
Connects Poisson regression to generalized linear models, log links, likelihood functions, Tweedie regression, and ridge regression.

Also explained in

Compare how 7 books explain Poisson distribution →

Related concepts

This explainer was generated by Manning's knowledge graph from the text of Ensemble Methods for Machine Learning. The section links point to the parts of the book it draws on.