When working on this question dedicated to what I believe is a significant limitation/defect of the current implementation of the "LevenbergMarquardt"
algorithm in FindMinimum
, I found that the same code evaluates 15 - 25 times slower in version 10.4.1 as compared to version 8.0.4 on the same machine!
At the bottom of this post a Notebook containing the complete setup reproducing the issue is attached.
The following is a comparison of absolute timings of the same FindMinimum
code evaluated with the two versions along with the number of steps taken by FindMinimum
, achieved minimum and obtained new values of parameters of the model. The setup can be found in the attached Notebook.
With version 8.0.4 on Windows 7 x64 I get the following:
findMinimum[init, MaxIterations -> 500, WorkingPrecision -> 20, PrecisionGoal -> 3,
StepMonitor :> ++steps, Method -> {"LevenbergMarquardt", "Residual" -> residualVect}]
{"00:06:35", 220, 0.00405321003823167,
{?0[1]->406.18, ?[1]->346.16, ?[2]->0.22879, ?0[2]->666.41, ?[2]->239.54, ?[3]->0.20278}}
The output means that the evaluation has taken 6 min 35 sec and finished in 220 steps, obtained minimum is 0.00405321003823167
, the obtained new values of the parameters follow.
And this is what I get with version 10.4.1 installed on the same machine:
findMinimum[init, MaxIterations -> 500, WorkingPrecision -> 20, PrecisionGoal -> 3,
StepMonitor :> ++steps, Method -> {"LevenbergMarquardt", "Residual" -> residualVect}]
{"02:37:07", 220, 0.00405321003823167,
{?0[1]->406.18, ?[1]->346.16, ?[2]->0.22879, ?0[2]->666.41, ?[2]->239.54, ?[3]->0.20278}}
As you see, the only difference is that now the evaluation has taken 2 hours 37 min 7 sec! It is more than 23 times slower than with version 8.0.4!
Do you experience the same problem? Is it possible to get FindMinimum
of version 10.4.1 working as fast as FindMinimum
of version 8.0.4?
Attachments: