Path: news.mathworks.com!not-for-mail
From: <HIDDEN>
Newsgroups: comp.soft-sys.matlab
Subject: Re: nonnegative Ax=b lsq for large, sparse A.
Date: Thu, 2 Jul 2009 09:12:01 +0000 (UTC)
Organization: Cambridge Univ
Lines: 44
Message-ID: <h2htl1$38n$1@fred.mathworks.com>
References: <h22iil$a5s$1@fred.mathworks.com> <h22k59$om8$1@fred.mathworks.com> <h22ot5$bca$1@fred.mathworks.com> <h22q2l$sdn$1@fred.mathworks.com> <h22tdi$em2$1@fred.mathworks.com> <h2go35$kl1$1@fred.mathworks.com>
Reply-To: <HIDDEN>
NNTP-Posting-Host: webapp-02-blr.mathworks.com
Content-Type: text/plain; charset="ISO-8859-1"
Content-Transfer-Encoding: 8bit
X-Trace: fred.mathworks.com 1246525921 3351 172.30.248.37 (2 Jul 2009 09:12:01 GMT)
X-Complaints-To: news@mathworks.com
NNTP-Posting-Date: Thu, 2 Jul 2009 09:12:01 +0000 (UTC)
X-Newsreader: MATLAB Central Newsreader 870214
Xref: news.mathworks.com comp.soft-sys.matlab:552306


Tim,

Thanks for your investigation. If you hang on as long as I did, you'll get frustrated with lsqnonneg.

My strategy will be to write a version of lsqnonneg ( I have the textbook containing the original 'nnls' algorithm on which it is based ), with the ability to use various different solution techniques from both the MATLAB tools and your toolbox(es). I think it'll make a nice addition to the FEX, and I'll trial the different methods on the matrix in question. Once I've done that, I'll let you know a solution method and preconditioning options.

I'll be away for a couple of weeks, so will post once I'm back.

Thanks, and kind regards

Tom Clark



 

"Tim Davis" <davis@cise.ufl.edu> wrote in message <h2go35$kl1$1@fred.mathworks.com>...
> "Thomas Clark" <t.clark@remove.spamcantab.net> wrote in message <h22tdi$em2$1@fred.mathworks.com>...
> > @Tim,
> > 
> > Thanks very much, you're more than welcome to add it to your collection - if you like, I can submit it via the online interface.
> > I've resubmitted the matrix in text file form (A and b) at the same link, the .mat file must have become corrupted.
> > www2.eng.cam.ac.uk/~thc29/lsqnonneg_sparse/
> > 
> > @Matt,
> > 
> > Unfortunately, the hessian is not diagonally concentrated, so I'm trying the solution out without a preconditioner. 
> > 
> > However, I am getting some very good results. This is standing up extremely well against an alternative (iterative) approach to the same overall problem... It's also  reasonably quick even without preconditioning. I'm on the way, and will invest more time testing this rigorously.
> > 
> > Thanks, both of you :)
> > 
> > Tom Clark
> 
> 
> I've downloaded the matrix (A.txt and b.txt).  Both x=A\b and x=spqr_solve(A,b) ran out of memory on my 32-bit, 4GB RAM, 3.2GHz Pentium 4 computer with MATLAB R2009a.  And of course they woudn't give the right solution anyway even if they did work.  I then tried  lsqlin (A,b, [],[],[],[], lb) ; where lb is an all-zeros vector.  It finished in 88 seconds, and returns an x with norm(A*x-b) of about 29.97, and min(x) is about 1e-15.
> 
> I tried lsqnonneg(A,b), after waiting maybe 10 minutes, it's is still running.  It would go faster if the backslash inside is replaced with spqr_solve.  Maybe I'll give that a try.
> 
> Once you figure out a solution using Matt's method, could you post, here, a function
> 
> x = mysolver(A,b) ;
> 
> that solves your system?  And maybe a flag saying whether or not to do preconditioning?  Then I can post that along with the matrix, in my collection, and then if someone looks at the problem there they might find yet a better method.  In any case, it's nice to include a proper solution method with a matrix in my collection.