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

using iterative minimizer routine to improve getting stuck in a local minimum #277

Open
M-X-Lin opened this issue Dec 15, 2022 · 2 comments

Comments

@M-X-Lin
Copy link

M-X-Lin commented Dec 15, 2022

I notice "minimize" can easily get stuck in a local minimum if the theory model is complicated even with the covmat provided by MCMC chains.

One piece of evidence is that if I run "minimize" again with exactly the same setting (rhoend=0.01), but the starting point from the last minimum, it can return a better result (sometimes chi2 improvement can be more than 1).

I found one way to improve it is to use the iterative minimizer routine: repeat "minimize" by setting the starting point as the last minimum until the chi2 difference between the current and last round is less than a certain threshold, e.g. 0.1. This iterative routine can significantly improve the result, sometimes by Dchi2~3 (e.g. in Class Early Dark Energy scalar field model).

@cmbant
Copy link
Collaborator

cmbant commented Dec 15, 2022

If you run with MPI it should try multiple random points are report the lowest, with a warning if it doesn't look well converged. You can of course also play with the accuracy parameters

@M-X-Lin
Copy link
Author

M-X-Lin commented Dec 15, 2022

If you run with MPI it should try multiple random points are report the lowest, with a warning if it doesn't look well converged. You can of course also play with the accuracy parameters

Thanks for your reply, Antony. My tests are always with MPI (np=6) in a single minimize round, and it can still finish successfully without any warning, although the result is definitely not good enough (since I found a better one using the iterative routine).

@cmbant cmbant changed the title using iterative minimizer routine to imporve getting stuck in a local minimum using iterative minimizer routine to improve getting stuck in a local minimum Oct 18, 2023
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