Skip to content

Conversation

@MichaelClerx
Copy link
Member

@MichaelClerx MichaelClerx commented Nov 21, 2023

Closes #1502

@MichaelClerx
Copy link
Member Author

@martinjrobins @chonlei @mirams can you have a look and see if this makes sense, before I add tests?

## Unreleased

### Added
- [#1508](https://github.com/pints-team/pints/pull/1508) Added a method `OptimisationController.set_max_unmoved_iterations` that allows methods to stop after 1 or more iterations with no significant movement in parameter space.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

"unmoved/unchanged" is a bit vague and not immediately obvious to me in terms of whether it refers to xtol or ftol? unmoved parameters, unchanged objective?

Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I agree! But can't think of anything better that doesn't involve deprecating set_max_unchanged_iterations which is probably one of the most used methods of the controller class

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmmmm, given all the different names that exist already, inventing another set that are pints specific doesn't seem great anyway - and even more so if they are vague!

@MichaelClerx MichaelClerx marked this pull request as ready for review January 26, 2026 15:05
@MichaelClerx MichaelClerx marked this pull request as draft January 26, 2026 15:10
@MichaelClerx
Copy link
Member Author

MichaelClerx commented Jan 26, 2026

Fine, we can just go with long names

  • set_max_unchanged_function_iterations
  • set_max_unchanged_parameter_iterations
  • Make "unchanged_iterations" be a deprecated alias of unchanged_function_iterations

@MichaelClerx
Copy link
Member Author

Fine, we can just go with long names

* [ ]  set_max_unchanged_function_iterations

* [ ]  set_max_unchanged_parameter_iterations

* [ ]  Make "unchanged_iterations" be a deprecated alias of unchanged_function_iterations

Going to do this next week, merge it in, and do a new release that's compatible with latest numpy #1712 unless anyone has strong objections @mirams @martinjrobins @chonlei ?

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

Successfully merging this pull request may close these issues.

Add "xtol" and "ftol" stopping criteria for optimisers

3 participants