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

Convergence criteria #381

Open
1 task done
gaborantal opened this issue Nov 23, 2022 · 3 comments
Open
1 task done

Convergence criteria #381

gaborantal opened this issue Nov 23, 2022 · 3 comments

Comments

@gaborantal
Copy link

Is your feature request related to a problem? Please describe.
Currently, only fixed number of iteration can be set to the optimizer. However, a convergence criteria would be useful.

Describe the solution you'd like
By using a convergence criteria, a maximum number of steps OR the convergence criteria could be used to stop the iteration (whichever happens first). The reason why the iteration stopped should be available after the execution.

Are you able and willing to implement this feature yourself and open a pull request?

  • Yes, I can provide this feature.

If anyone can do this issue, that would be great, however, I'm also fine with doing it myself in a form of PR.

@till-m
Copy link
Member

till-m commented Nov 23, 2022

Hi @gaborantal,

you're not the first to bring this up and I can see the appeal.

In my personal opinion, since such things can be performed by using suggest-evaluate-register (#373) instead of optimizer.maximizer(), I would prefer to keep the API clean. I would be interested in what other people have to say though.

How would you determine that the optimization procedure has converged?

@bwheelz36
Copy link
Collaborator

I wouldn't mind adding optional convergence criteria as an argument that can be passed at instantiation.
At the moment, there is only really one - number of iterations. But we could also add:

  • If x iterations have occured without at least y improvement (y should probably include both relative and absolute tolerance?)
  • if a solution is found better than some value
  • others?

@gaborantal
Copy link
Author

* If `x` iterations have occured without at least `y` improvement (y should probably include both relative and absolute tolerance?)

This is exactly what we need. However, your other mentioned option also looks great, and might be useful.

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

No branches or pull requests

3 participants