Message Boards Message Boards


What is the "Automatic" MaxIterations in FindMinimum ?

Posted 4 months ago
4 Replies
2 Total Likes

I am using FindMinimum a lot. When it doesn't converge as well as I want, sometimes I want to increase MaxIterations. But the documented default value of MaxIterations is simply "AUTOMATIC". So if I want to increase it, I don't know what to increase it from! I don't know whether AUTOMATIC is a fixed number (that the mysterious W authorities are hiding from me), or whether it is set internally at each execution by FindMinimum. If it fixed, what is it? And if it is set internally, is there a way to have FindMinimum tell me what number it just used in some particular execution, so i can try again with a bigger number?

Thanks. If you tell me the answer, I will tell you the Secret of Stradivarius.

4 Replies


my guess is that one can count the actual number of iterations by using StepMonitor

FindMinimum[Exp[x] + 1/x, {x, 1}, StepMonitor :> Print["Step to x = ", x]]

(This is the very first example from the documentation on StepMonitor.)

And: Now what is the "Secret of Stradivarius"?

I suspect it is usually 100 but might be different for some methods if they are considered to be more costly. Usually in similar situations I start raising to 200, 400, etc. Until either I get the impression it won't help (e.g. stalling in the same place), or I get better results.

Posted 4 months ago

Ah ... thank you both for your responses ... but you can see why I find this frustrating. Does anyone from Wolfram read this?

And, since you asked:

The Secret of Stradivarius was ... The Other Mrs Stradivarius.

Yes, that was his secret: he had another wife on the other side of town ...

To be honest: I cannot see anything frustrating here. My understanding (!) is: When you use FindMinimum and it gives a result without any warning, then in any case the number of iterations was obviously sufficient - and increasing MaxIteration is pointless. If MaxIteration was too small then it throws a warning, displaying the (insufficient) number of iterations used. (Here this is provoked:)

enter image description here

But reading Daniels answer I get the suspicion that I might be wrong ...

Reply to this discussion
Community posts can be styled and formatted using the Markdown syntax.
Reply Preview
or Discard

Group Abstract Group Abstract