pymc-devs / pymc

Bayesian Modeling and Probabilistic Programming in Python
https://docs.pymc.io/
Other
8.73k stars 2.02k forks source link

approx_hessian throws PositiveDefiniteError when called with test_point #607

Closed tshauck closed 8 years ago

tshauck commented 10 years ago

Hi,

I'm attempting to implemented a similar step as: Issue #544, however when I attempt to use the test point to approximate the hessian, I'm met with

PositiveDefiniteError: Scaling is not positive definite. Simple check failed. Diagonal contains negatives. Check indexes [ 0 10]

I'm not sure what additional information would be helpful, but I'm happy to provide what I can.

tshauck commented 10 years ago

Not sure if it's related to Issue #410. I tried using the MAP estimated, but it gives unreasonable results (I think) do to the fact I'm fitting a multilevel model.

twiecki commented 10 years ago

Yeah, multilevel models are tricky. There are several potential strategies:

If none of these work you can paste the model you have.

fonnesbeck commented 8 years ago

Closing. Please re-open if this issue is ongoing.