Successful minimization:

Hello,

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 ?

Thanks

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?

Thanks

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

Hi Andreas,

I have a similar situation and the results of f.optim are as below:

 * Status: failure (line search failed)

 * Candidate solution
    Final objective value:     4.223204e+04

 * 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')|         = 2.78e-04 β‰° 0.0e+00
    |f(x) - f(x')|/|f(x')| = 6.57e-09 β‰° 0.0e+00
    |g(x)|                 = 7.04e-01 β‰° 1.0e-03

 * Work counters
    Seconds run:   2028  (vs limit Inf)
    Iterations:    142
    f(x) calls:    160
    βˆ‡f(x) calls:   142

These are the parameters after optimization are a little far from the true model simulations but not close to 0 on any parameter. What would be essential fix in such a case?

FittedPumasModel

Successful minimization:                     false

Likelihood approximation:                     FOCE
Log-likelihood value:                   -42232.037
Number of subjects:                           5000
Number of parameters:         Fixed      Optimized
                                  0             19
Observation records:         Active        Missing
    DV:                       44771            229
    DV_Resp:                  44771            229
    Total:                    89542            458

------------------------
              Estimate
------------------------
tvcl          11.359
tvvc          72.099
tvq           11.367
tvvp          23.184
tvka           0.98933
tvkin         21.849
tvkout         0.76799
tvImax         0.98203
tvIC50         1.8761
Ω₁,₁           0.063178
Ξ©β‚‚,β‚‚           0.050166
Ω₃,₃           0.12234
Ξ©β‚„,β‚„           0.2421
Ξ©β‚…,β‚…           0.1877
Ω₆,₆           0.16251
Ω₇,₇           0.10633
Οƒ_prop_pk      0.11043
Οƒ_add_pk       0.20134
Οƒ_add_pd       0.10133
------------------------

How far are they away from the truth, @parssh.mehta

Not too far off. The above estimates are from a mis-specified model.

True Model Params:
final_params = (tvcl      = 11.3,
                tvvc      = 37.6,
                tvq       = 31.4,
                tvvp      = 47.8,
                tvka      = 0.8,
                tvkin     = 20,
                tvkout    = 0.7,
                tvImax    = 1,
                tvIC50    = 2,
                Ξ©         = Diagonal([0.0625,0.09,0.0625,0.09,0.09,0.16,0.09]),
                Οƒ_prop_pk = 0.1, 
                Οƒ_add_pk  = 0.2, 
                Οƒ_add_pd  = 0.1)
1 Like