linear least square optimization method that benefits from good start value?

6 views (last 30 days)
i'm solving the unconstrained least square problem (min |Cx -d)|^2 with lsqlin:
[x] = lsqlin(C,d,[],[],[],[],[],[],[]);
[x2] = lsqlin(C,d,[],[],[],[],[],[],[x]);
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

Answers (2)

Alan Weiss
Alan Weiss on 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
  1 Comment
Peter on 9 Aug 2013
thanks Alan, backslash is what I used first but there's hardly any difference.

Sign in to comment.

John D'Errico
John D'Errico on 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.

Community Treasure Hunt

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

Start Hunting!