Skip to content

ENH: new convenience method fit_difficult #3521

Open

Description

@josef-pkt

partially a follow-up to #3520

AFAIR, Stata has something like "try harder" for difficult optimization problems in some models

We started thinking about switching in a squence of optimization methods and endogenous switching between methods, but this is currently messy. GLM has an option to use irls before fit_gradient.

A noninvasive way to get to this would be to introduce a new method fit_difficult that repeatedly calls the fit method. This should be a convenient "automatic" feature to try to identify and work around convergence problems, including non-positive definite hessian.
We could also add the option here about what to do with singular or near-singular score_obs, i.e. instead of just checking the exog, we check the full score array (including derivatives/score_factor and weights).
We could also switch to OPG if hessian is not invertible or not definite.

This would be mainly for models that use the scipy optimizers. I'm not sure about the other ones like RLM and QuantileRegression.

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