Poisson Regression is a statistical approach used to model count data, particularly for outcomes that represent counts or rates following a Poisson distribution. This method is integral in fields where the prediction of discrete events is crucial, such as epidemiology, insurance, and sports analytics. It extends the linear regression framework to accommodate non-negative integer responses, offering insights into how explanatory variables influence the log-rate of a given outcome.
The Poisson distribution is key to understanding Poisson regression. It models the probability of a given number of events occurring within a fixed interval, assuming these events happen at a constant rate and independently of each other. The distribution's probability mass function for observing events is defined as:
where is the event rate and is Euler's number.
Poisson regression predicts the log of the expected count as a linear combination of the input variables. If denotes the count variable, then its expected value conditioned on explanatory variables is related to those variables through the logarithm function:
Here, are parameters to be estimated.
The coefficients of a Poisson regression model are typically estimated using Maximum Likelihood Estimation (MLE). The likelihood function for a set of parameters given the observed data in Poisson regression is:
where is the expected count for the -th observation, and is the observed count.
To find the parameter estimates that maximize the likelihood, gradient-based optimization techniques are often employed. The gradient of the likelihood function with respect to the parameters can be calculated and used to iteratively adjust the parameters until the maximum likelihood estimates are found.
The gradient of the log-likelihood function (since the logarithm is a monotonic function, maximizing the log-likelihood maximizes the likelihood) with respect to is:
This gradient tells us how to adjust to increase the likelihood, given the data. Optimization algorithms, such as Newton-Raphson or gradient ascent, use these gradients to update the parameters iteratively.
learning_rate
: float
, default = 0.01max_iter
: int
, default = 100l1_ratio
: float
, default = 0.5alpha
: float
, defualt = 0.01regularization
: Literal['l1', 'l2', 'elastic-net']
, default = NonePoisson regression has broad applications, including but not limited to:
- Dobson, Annette J., and Adrian G. Barnett. "An Introduction to Generalized Linear Models." CRC Press, 2008.
- Hilbe, Joseph M. "Negative Binomial Regression." Cambridge University Press, 2011.
- McCullagh, Peter, and John Nelder. "Generalized Linear Models." Chapman & Hall/CRC, 1989.