PoissonRegression

PoissonRegression(
    alpha=0.0,
    l1_ratio=0.0,
    fit_intercept=True,
    max_iterations=1000,
    tolerance=1e-08,
    l1_smoothing=1e-06,
)

Poisson regression estimated by maximum likelihood.

The model minimizes the negative Poisson log-likelihood. For regularized fits, the optimizer switches to Frank-Wolfe over an exact L1 or L2 ball. For unregularized fits, the class exposes classical inverse-information covariance estimates and robust QMLE sandwich covariance estimates.

Attributes

Name Type Description
coef_ ndarray of shape (n_features,) Estimated slope coefficients.
intercept_ float Estimated intercept. Equals 0.0 when fit_intercept=False.
params_ ndarray of shape (n_params,) Full parameter vector, including the intercept when present.
std_errors_ ndarray or None Classical standard errors for params_.
robust_std_errors_ ndarray or None Robust QMLE standard errors for params_.

Methods

Name Description
confidence_intervals Return coefficient confidence intervals.
fit Fit the Poisson regression model.
predict Predict the conditional mean count.
score Return the negative mean Poisson deviance.
summary Return [coef, se, ci_lb, ci_ub] for each fitted parameter.

confidence_intervals

PoissonRegression.confidence_intervals(alpha=0.05, covariance_type='nonrobust')

Return coefficient confidence intervals.

fit

PoissonRegression.fit(X, y)

Fit the Poisson regression model.

Parameters

Name Type Description Default
X ndarray of shape (n_samples, n_features) Feature matrix. required
y ndarray of shape (n_samples,) Non-negative count response. required

Returns

Name Type Description
PoissonRegression The fitted estimator.

predict

PoissonRegression.predict(X)

Predict the conditional mean count.

score

PoissonRegression.score(X, y)

Return the negative mean Poisson deviance.

summary

PoissonRegression.summary(alpha=0.05, covariance_type='nonrobust')

Return [coef, se, ci_lb, ci_ub] for each fitted parameter.