Skip to content

biased prediction with regularized/penalized estimators Logit #3323

Open

Description

@josef-pkt

mainly an interesting question
https://mail.python.org/pipermail/scikit-learn/2016-December/000995.html
prediction in regularized Logistic Regression (scikit-learn) is biased.

edit There might be something fishy in scikit-learn or with the example. AFAICS, the estimating equation for the constant stays unchanged when other parameters are penalized at (endog - fittedvalues).sum() = 0. This means that the estimated probability should still be equal to the sample fraction as in the unpenalized case, i.e. the constant adjusts for the shrinkage in the other parameters.
(Aside: L1 or L2 penalization is additive in loglike and score. This is different from robust estimators where the moment condition itself is nonlinearly transformed and we need to compensate for the bias introduced by the nonlinear transformation, especially (or only?) when the distribution is asymmetric.)

I have looked mostly at the effect of regularization on parameter estimates, and I don't know what the general impact on prediction is, i.e. reduce variance but get a biased prediction.

main point here: What's the penalization target? In most cases we penalize toward params = 0, which implies in the logit/probit case to bias towards a prediction of 0.5. Does the intercept compensate?

For us: Can we use the offset to change the penalization target?
two extremes:

  • without regularization affine reparameterization does not affect prediction.
  • with fully specified "prior" we can choose an arbitrary penalization target depending on the parameterization.
  • If we are limited to a specific implementation of the penalization target, like zero in LASSO or Ridge, then using offset and reparameterization affect the penalization target and the estimator is not affine equivariant/invariant. What would be a useful way to choose a "prior" implemented via transformation and offset?
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions