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

Getting errors/standard deviation from OptimizationResults object #213

Closed
astro-kevin opened this issue Apr 19, 2023 · 4 comments
Closed

Comments

@astro-kevin
Copy link

Is there a way to get the error/standard deviation of parameters from a OptimizationResults object?

@robertfeldt
Copy link
Owner

Standard deviation of what? In the parameter positions? If you are using a population-based optimizer it has a population of solutions so if you wanted you could get all those solutions and study the std over the parameters. But very unclear what the value would be since low std could just indicate that the population has converged to almost the same optimum. This might not say much about other optima. Can you describe more what you are trying to achieve?

@astro-kevin
Copy link
Author

I guess what I'm looking for is the inverse of the hessian matrix returned by the fit because I'm fitting a negative log likelihood function, and that'll get me the gaussian approximation to the maximum likelihood. I know that such a thing exists in python packages which I used before, but I don't know if there's a way to get this here.

@robertfeldt
Copy link
Owner

This is in general not available from heuristic, black-box optimization algorithms. The whole point with them is that they can be applied even when the derivatives or the Hessian cannot be calculated or isn't efficiently available. So you might be better off investigating the Optim.jl package, see for example: https://julianlsolvers.github.io/Optim.jl/stable/#examples/generated/maxlikenlm/

@astro-kevin
Copy link
Author

Thanks, I guess I didn't understand how BlackBoxOptim worked.

This issue was closed.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants