linear least square optimization method that benefits from good start value?
2 Ansichten (letzte 30 Tage)
Ältere Kommentare anzeigen
i'm solving the unconstrained least square problem (min |Cx -d)|^2 with lsqlin:
tic
[x] = lsqlin(C,d,[],[],[],[],[],[],[]);
toc
tic
[x2] = lsqlin(C,d,[],[],[],[],[],[],[x]);
toc
I will have a quite decent start value for x in my problem. In order to figure out whether lsqlin really benefits from a good start value, I used the solution as the start value and ran lsqlin again, see code. Solving took just as long (appr 20 seconds) the second time, probably because no iteration is involved. So obviously this is not the way to handle my problem. Can anyone advice me on a method to solve this type of problem, that does benefit from a good start value for x? many thanks, P
0 Kommentare
Antworten (2)
Alan Weiss
am 8 Aug. 2013
I believe that if you do not include any constraints in your problem, lsqlin simply calls backslash:
x = C\d;
The starting point in this case is ignored. See for yourself:
edit lsqlin
While there might possibly be a faster way, all I can think is that you might as well just use backslash. I have no better advice for you in this case, sorry.
Alan Weiss
MATLAB mathematical toolbox documentation
John D'Errico
am 8 Aug. 2013
Simple linear least squares has no need for a good starting value. Backslash won't run any faster. And there is no real need to use lsqlin with no constraints at all. backslash should be faster then anyway, since the additional overhead of lsqlin is removed.
If your problem is really large enough to take a long time, are you using sparse matrices? If it is sparse and you are not, then why not?
Big problems take time to solve. Just wanting it to run faster is tough to achieve unless you are willing to invest money in a faster computer.
2 Kommentare
Siehe auch
Kategorien
Mehr zu Linear Least Squares finden Sie in Help Center und File Exchange
Produkte
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!