Prev: Low pass filter
Next: Multiple Bar Graphs
From: Bruno Luong on 28 May 2010 14:39 > > However, if possible, can you briefly explain: > (i) Why lsqlin is faster? I was told that even lsqnonneg preserve the sparsity pattern. lsqlin is quadratic programming, and lsqnonneg is a special quadratic programming with box constraints. I believe lsqlin is based on the Active set method written by Gill & Murray. The active set requires to update the active constraints set, which is the difficult point. Some methods are more efficient, but needs some form of the inverse of the matrix (usually a projection of the Hessian on the active set), thus destroy the sparsity. Some other method (large scale) preserves the sparsity, but less efficient. I guess that's the main difference between LSQLIN and LSQNONNEG. > > (ii)Can not I make the box constraint in lsqlin simpler as well? I don't know (see below) > > (iii) Would you mind sharing your version of lsqnonneg so that I can have a look and see how algorithm works? Sorry I can't. The exact method I use for T2 inversion belongs top my former employer (we use the algorithm to compute the T2 on a tiny processors). However I can provides another solver, called QPAS that is written by Adrian Wills, the same author of LSQNONLIN. You can contact AW by following this link: http://sigpromu.org/quadprog/ if strcmp(Solver, 'qpas') dy = y_exp_1D_Reg-AComp*x2_1D_NoRegul; Hess = 0.5*(AComp'*AComp); rhs = -AComp'*dy; n = size(Hess,1); lo = zeros(n,1); up = inf(n,1); [dx exitflag] = qpas(full(Hess),rhs,... zeros(0,n),zeros(0,1),... zeros(0,n),zeros(0,1),... lo,up); x2_1D_SimultReg = x2_1D_NoRegul+dx; residual = AComp*x2_1D_SimultReg-y_exp_1D_Reg; resnorm = norm(residual)^2; figure(3) end > > (iv) Also, I was trying to locate the stopping criteria inside the code. I could not find there. It seems that it may be handled by some other function. If you know the name, would you please let me know? > I let this question to be addressed by the authorities from Mathworks if they are reading. Bruno
From: Dushyant Kumar on 1 Jun 2010 10:03
"Bruno Luong" <b.luong(a)fogale.findmycountry> wrote in message <htp2kr$jv0$1(a)fred.mathworks.com>... > > > > Bruno I am sorry. My previous report about lsqnonneg and lsqlin returning similar result with simulated data with Gaussian error was wrong. So, I am still struck with the same problem. lsqnonneg --> satisfactory result, but terribly slow lsqlin --> fast, but not very satisfactory. Can I parallelize some feature of lsqnonneg as I have access to matlab cluster? Someone please help... |