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

조회 수: 2 (최근 30일)
Peter
Peter 2013년 8월 8일
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

답변 (2개)

Alan Weiss
Alan Weiss 2013년 8월 8일
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
Peter
Peter 2013년 8월 9일
thanks Alan, backslash is what I used first but there's hardly any difference.

댓글을 달려면 로그인하십시오.


John D'Errico
John D'Errico 2013년 8월 8일
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
Peter
Peter 2013년 8월 9일
Hi John, thanks for your answer. C is not sparse unfortunately and backslash is hardly any faster.
Richard Brown
Richard Brown 2013년 8월 9일
out of curiosity, what size is your matrix C?

댓글을 달려면 로그인하십시오.

카테고리

Help CenterFile Exchange에서 Linear Least Squares에 대해 자세히 알아보기

제품

Community Treasure Hunt

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

Start Hunting!

Translated by