Successful minimization:


An output from fitted pumas model shows successful minimization which could be true or false. What is the criteria based on which the software if there was successful minimization or not ?


Hello Ahmed,

You can get more detailed information about the optimization by extracting the optimization struct from the the mode fit struct. I.e. if you have saved your model fit in the variable ft then you can look at the ft.optim field. It will look like

julia> ft.optim
 * Status: success

 * Candidate solution
    Final objective value:     1.572899e+02

 * Found with
    Algorithm:     BFGS

 * Convergence measures
    |x - x'|               = 5.03e-06 ≰ 0.0e+00
    |x - x'|/|x'|          = 1.19e-06 ≰ 0.0e+00
    |f(x) - f(x')|         = 5.26e-10 ≰ 0.0e+00
    |f(x) - f(x')|/|f(x')| = 3.34e-12 ≰ 0.0e+00
    |g(x)|                 = 8.06e-05 ≤ 1.0e-03

 * Work counters
    Seconds run:   1  (vs limit Inf)
    Iterations:    24
    f(x) calls:    37
    ∇f(x) calls:   25

There is a subsection named Convergence measures listing the possible convergence criteria. If either of them are satisfied then the optimization status is success. If the optimization finished without satisfying any of the five criteria then the optimization status will be failure.

Hello Andreas,
Thanks so much for the reply. I applied the function and got the following output

  • Status: failure (line search failed)

  • Candidate solution

    Final objective value: 2.389713e+03

  • Found with

    Algorithm: BFGS

  • Convergence measures

    |x - x’| = 0.00e+00 ≤ 0.0e+00

    |x - x’|/|x’| = 0.00e+00 ≤ 0.0e+00

    |f(x) - f(x’)| = 1.75e-05 ≰ 0.0e+00

    |f(x) - f(x’)|/|f(x’)| = 7.34e-09 ≰ 0.0e+00

    |g(x)| = 6.02e-03 ≰ 1.0e-03

  • Work counters

    Seconds run: 1709 (vs limit Inf)

    Iterations: 17

    f(x) calls: 38

    ∇f(x) calls: 17

According to my understanding the first two criteria are satisfied but still I am getting false minimization, am I understanding right?


Hello Ahmed,

The visual presentation of the result here is a bit misleading. You are right the the inequality looks like like criterion is satisfied for the first two criteria. However, zero is being used for non-active convergence criteria. When |x - x’| is zero, as in the example above, it means that no improvements could be found along the search direction. The only active (non-zero) stopping criterion is based on the gradient g(x) and it’s still larger than the tolerance so the status of the optimization is failure. You can see that the line search issue is also mentioned in parentheses.

1 Like