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.
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
