lsqnonlin seems stuck at the same residual value,norm step and first order optimality for a while now

1 vue (au cours des 30 derniers jours)
Hi hi, my lsqnonlin seems stuck after 7th iteration.
Iteration Func-count f(x) step optimality CG-iters
0 9 0.247067 0.0282
1 18 0.23938 10 0.0413 0
2 27 0.238046 20 0.0464 0
3 36 0.236123 40 0.0529 0
4 45 0.232245 80 0.124 0
5 54 0.221193 160 0.0699 0
6 63 0.208611 320 0.0877 0
7 72 0.208611 34.3923 0.0877 0
8 81 0.208611 34.3923 0.0877 0
9 90 0.208611 34.3923 0.0877 0
10 99 0.208611 34.3923 0.0877 0
11 108 0.208611 34.3923 0.0877 0
12 117 0.208611 34.3923 0.0877 0
13 126 0.208611 34.3923 0.0877 0
14 135 0.208611 34.3923 0.0877 0
15 144 0.208611 34.3923 0.0877 0
16 153 0.208611 34.3923 0.0877 0
what does this mean? Thanks in advance.
  5 commentaires
J J
J J le 2 Juil 2012
Hi Sargondjani,
yes, I have tried different starting values, and this seems to help. e.g. for my simulations, starting at the true values can be all right; but then lsqnonlin can get stuck with small deviations from that true value. so , you may be correct about the non-differentiability issue. But is there a way to set up a criteria for lsqnonlin to jump to a different point when this happens?
no, actually I have 10 parameters to be estimated. This behavior happens more for my other model with 12 parameters. and I only have 120 data points. yes, too many parameters.
each iteration takes about 3 sec-1min. (as function-count increases with iteration number, I believe).
Marylen Sun
Marylen Sun le 26 Nov 2020
Hello, did you find a way to set up a criteria for lsqnonlin to jump to a different point when the non-differentiability happen, please?

Connectez-vous pour commenter.

Réponses (1)

Matt J
Matt J le 26 Nov 2020
Modifié(e) : Matt J le 27 Nov 2020
For a 3-variable problem known to have non-differentiabilities, it would make sense to use fminsearch instead of lsqnonlin. There are no differentiability requirements in fminsearch, though it works better when there is at least continuity.
It may also be practical in a 3-variable problem to sample the objective on a discrete grid and do a simple discrete search for the minimum. This is especially advisable if the function evaluations can be done in a fast, vectorized manner. If nothing else, this is often a useful way to find a good initial guess for iterative solvers like fminsearch.

Community Treasure Hunt

Find the treasures in MATLAB Central and discover how the community can help you!

Start Hunting!

Translated by