Azzera filtri
Azzera filtri

Is the solver 'lsqnonlin' boundary dependent?

1 visualizzazione (ultimi 30 giorni)
Runze Zhang
Runze Zhang il 31 Gen 2022
Commentato: Runze Zhang il 2 Feb 2022
Hello everyone,
I 'm trying to use 'lsqnonlin' to solver an overdetermined equation system. But I found that the final results are really dependent on the lower and upper boundary. So that means if I want to get the precise values, I should tighten the boundary to a very small interval. But in practice we can't know the exact boundary very precisely. So my question is that is 'lsqnonlin' really so boundary dependent as I guessed and if there is any other boundary independent solver recommended if possible?
Thanks in advance!
Runze

Risposte (2)

Benjamin Thompson
Benjamin Thompson il 31 Gen 2022
Looking at the documentation for lsqnonlin, there are options for solving a problem with or without boundaries on the input variables. Solving nonlinear problems can be difficult, you may need to try a different approach on the initial guess, use simulated annealing repeating with a range of initial guesses, or try an evolutionary approach that optimizes a set of guesses from one iteration to the next.
  1 Commento
Runze Zhang
Runze Zhang il 1 Feb 2022
Thanks for your answer, Benjamin! Yes, I'm trying what you adviced and hope that makes sense.

Accedi per commentare.


John D'Errico
John D'Errico il 1 Feb 2022
This is unlikely to be the case of lsqnonlin being "boundary dependent". That is not true in my experience. It is more likely a case of the estimation problem being poorly posed. Do you have large residuals, or is the problem nearly singular, etc.? lsqnonlin is basically just an optimizer, that is applied to a specific class of objectives, so a sum of squares of residuals, optionally with bound constraints. If the problem is a difficult one, it will have a problem. But then you are likely to also have similar problems with other solvers as applied to the same problem.
My guess is there are multiple solutions to the problem, all of which are nearly as good as any other in that set, so when you change things, it finds a subtly different solution. If any solution is as good as any other, then it really does not matter which one you get in the end. Thiose solutions will typically lie along some path in the parameter space, effectively a long, flat, probably curved valley in the objective function.
  1 Commento
Runze Zhang
Runze Zhang il 2 Feb 2022
Yes, you are right. Since the system is rather complex, if you run the script pure mathematically, you can get many solutions, some of them have even better precision than our desired result.

Accedi per commentare.

Tag

Prodotti


Release

R2021a

Community Treasure Hunt

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

Start Hunting!

Translated by