liveBook · Manning

Poisson regression

As explained in Ensemble Methods for Machine Learning

Poisson regression is a generalized linear regression method that models count-valued targets with a Poisson response distribution and typically a log link.

Poisson regression models targets that are counts: discrete occurrences rather than continuously varying measurements. It keeps a linear model for feature effects, then uses a log-link function and a Poisson distribution to match the shape and spread of count labels. This makes it a generalized linear model (GLM) variant rather than ordinary linear regression. section 7.1.2 section 7.1.4

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

Compare the discrete spread of count targets with the fitted trend: the Poisson distribution is designed for counts, unlike the normal-distribution assumption behind linear regression. section 7.1.2

Choose the regression variant by the target distribution:

  • Use Poisson regression for integer-valued counts or occurrences, with a log link and Poisson distribution. section 7.1.4
  • Use ridge or other classical linear regression for real-valued targets modeled with a normal distribution; it is a useful baseline but can fit count data poorly. section 7.4.2
  • Consider Tweedie regression when labels combine many zeros with right-skewed positive values; power=1 in TweedieRegressor is equivalent to PoissonRegressor. section 7.3.1 section 7.4.2

Regularization can make a Poisson model more robust to correlated features. In scikit-learn, PoissonRegressor uses L2 regularization controlled by alpha; alpha=0 removes it, while a positive value supplies ridge-like regularization. Evaluate predictions with measures such as MSE and MAE, and tune alpha with cross-validation when comparing candidate models. section 7.1.2 section 7.4.2

Bike-rental count prediction

For bike-rental targets, a PoissonRegressor was tuned alongside ridge and Tweedie regressors. The Poisson model achieved lower test MSE and MAE than the ridge baseline (1,228.898 versus 1,270.174 MSE; 20.641 versus 23.985 MAE), illustrating the value of aligning the model distribution with count data. The regressors can also serve as base estimators in a stacking ensemble. section 7.4.2

Poisson likelihood supplies the fitting objective for count-valued labels. Where a single Poisson distribution cannot represent the label pattern—such as rainfall with a large spike at zero plus positive right-skewed values—a Poisson-gamma/Tweedie approach is a better match. section 7.3.1

How Ensemble Methods for Machine Learning covers it

How deep it goes
Explains the linear model, log link, distributional assumption, regularization, evaluation, and library fitting without deriving a closed-form loss.
Examples
Uses synthetic count data and bike-rental prediction to compare Poisson, ridge, and Tweedie regressors.
What it assumes
Builds on regression terminology and reinforces the distinction between continuous, count, and categorical labels.
What you can do after
Apply it via scikit-learn’s PoissonRegressor, tune alpha, and compare count-model performance with MSE and MAE.
How it connects
Connects generalized linear models with linear regression, ridge regression, Tweedie regression, likelihood functions, and stacking.

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.