any trick to stop fminsearch early?
Show older comments
I am using fminsearch to minimize an error score in fitting a model to many, many data sets.
Often, the error score gets close enough to zero for my purposes, and at that point I'd like fminsearch to stop and go on to the next data set.
Unfortunately, I can't find choices for TolX and TolFun (nor maximum function evaluations, etc) that will reliably stop if and only if the total error score is low enough.
So, my question is whether there is some other way to get fminsearch to stop when my objective function detects that a low enough overall error has been achieved?
Thanks for any suggestions.
Accepted Answer
More Answers (1)
Walter Roberson
on 17 Nov 2019
1 vote
fminsearch permits options that include Outputfcn and that function can signal to terminate.
1 Comment
Jeff Miller
on 17 Nov 2019
Categories
Find more on Optimization in Help Center and File Exchange
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!