Skip to content

Commit

Permalink
Recommend AutoNormal guide when hessian in AutoLaplace is singular (#…
Browse files Browse the repository at this point in the history
…1118)

* Modify get_transform for Laplace guide

* Recommend AutoNormal guide

* Revert changes to imports

* Lint

* Revert change to test name
  • Loading branch information
freddyaboulton authored Aug 20, 2021
1 parent c9eb769 commit 9da69d2
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion numpyro/infer/autoguide.py
Original file line number Diff line number Diff line change
Expand Up @@ -889,7 +889,7 @@ def loss_fn(z):
warnings.warn(
"Hessian of log posterior at the MAP point is singular. Posterior"
" samples from AutoLaplaceApproxmiation will be constant (equal to"
" the MAP point)."
" the MAP point). Please consider using an AutoNormal guide."
)
scale_tril = jnp.where(jnp.isnan(scale_tril), 0.0, scale_tril)
return LowerCholeskyAffine(loc, scale_tril)
Expand Down

0 comments on commit 9da69d2

Please sign in to comment.