pylogit icon indicating copy to clipboard operation
pylogit copied to clipboard

Derive and Implement Analytic Hessian for Mixed Logit

Open timothyb0912 opened this issue 9 years ago • 2 comments

This is on the agenda for the coming months, but pull requests or contributions are always welcome.

At the moment, the sum of the outer products of the gradient are used as an approximation to the actual hessian.

timothyb0912 avatar Dec 05 '16 02:12 timothyb0912

Do we know that the Hessian has a closed form? If so do we know what it is? ("Derive" suggests we may not.) All answers are okay. Just trying to assess how much work this will be.

Eh2406 avatar Dec 05 '16 02:12 Eh2406

Hey, the same deal applies here as for the nested logit.

I think the hessian exists in closed-form. This is based on the fact that the gradient exists in closed form and that nothing indicates that the derivative of the gradient would be undefined or lose its closed-form nature. I haven't checked the math completely, but equation (3) of the the following link may be the hessian for a mixed logit model (or at least closely related to it): MM ALGORITHM FOR GENERAL MIXED MULTINOMIAL LOGIT MODELS

I say derive simply because one might have to derive the formulas oneself, and I typically do so anyway just to make sure I really understand the formulas when trying to code everything up.

timothyb0912 avatar Dec 05 '16 03:12 timothyb0912