linear least square optimization method that benefits from good start value?
2 次查看(过去 30 天)
显示 更早的评论
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 个评论
回答(2 个)
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
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 个评论
另请参阅
类别
在 Help Center 和 File Exchange 中查找有关 Linear Least Squares 的更多信息
产品
Community Treasure Hunt
Find the treasures in MATLAB Central and discover how the community can help you!
Start Hunting!