Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Investigate hessian instability #193

Closed
guilhermebodin opened this issue Sep 17, 2020 · 1 comment
Closed

Investigate hessian instability #193

guilhermebodin opened this issue Sep 17, 2020 · 1 comment
Labels
bug Something isn't working

Comments

@guilhermebodin
Copy link
Member

No description provided.

@guilhermebodin guilhermebodin added the bug Something isn't working label Jan 6, 2021
@guilhermebodin
Copy link
Member Author

Currently, we calculate the standard error by the formula

numerical_hessian = Optim.hessian!(func, opt_hyperparameters)
std_err = diag(inv(numerical_hessian))

This is wrong, the correct should be

numerical_hessian = Optim.hessian!(func, opt_hyperparameters)
std_err = sqrt.(diag(inv(numerical_hessian)))

but sometimes the values are negative which leads to a domain error when computing the sqrt.

We should calculate using the outer product of gradients, this is not trivial.
https://discourse.julialang.org/t/inconsistency-between-standard-errors-from-hessian-and-gradient-in-forwarddiff-optim/16769

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant