Discover MakerZone

MATLAB and Simulink resources for Arduino, LEGO, and Raspberry Pi

Learn more

Discover what MATLAB® can do for your career.

Opportunities for recent engineering grads.

Apply Today

Thread Subject:
Non-negative least squares with large spare matrix

Subject: Non-negative least squares with large spare matrix

From: Karl

Date: 11 Jan, 2012 22:15:08

Message: 1 of 3

Hi, I have a sparse matrix of size ~750,000x10,000, and I am looking to find the non-negative least-squares solution of the problem Ax = b.

I have tried using lsqnonneg but after about 30 minutes it spit out an error saying out of memory (I guess this is because the matrix is too large?). I don't have the optimization toolbox but I would like to try lsqlin with only specifying the lower bound. I would consider buying it if I was sure it would solve my problem, so does anyone know if it will work on a matrix of the size with reasonable speed? If not does anyone have any other solution in mind? Thanks very much!

Subject: Non-negative least squares with large spare matrix

From: Torsten

Date: 12 Jan, 2012 09:54:23

Message: 2 of 3

On 11 Jan., 23:15, "Karl " <karllandh...@gmail.com> wrote:
> Hi, I have a sparse matrix of size ~750,000x10,000, and I am looking to find the non-negative least-squares solution of the problem Ax = b.
>
> I have tried using lsqnonneg but after about 30 minutes it spit out an error saying out of memory (I guess this is because the matrix is too large?). I don't have the optimization toolbox but I would like to try lsqlin with only specifying the lower bound. I would consider buying it if I was sure it would solve my problem, so does anyone know if it will work on a matrix of the size with reasonable speed? If not does anyone have any other solution in mind? Thanks very much!

I have no experience with this solver, but did you try
http://www.mai.liu.se/~milun/sls/
?

Best wishes
Torsten.

Subject: Non-negative least squares with large spare matrix

From: Matt J

Date: 12 Jan, 2012 15:57:09

Message: 3 of 3

"Karl " <karllandheer@gmail.com> wrote in message <jel1lc$lg$1@newscl01ah.mathworks.com>...
> Hi, I have a sparse matrix of size ~750,000x10,000, and I am looking to find the non-negative least-squares solution of the problem Ax = b.
>
> I have tried using lsqnonneg but after about 30 minutes it spit out an error saying out of memory (I guess this is because the matrix is too large?). I don't have the optimization toolbox but I would like to try lsqlin with only specifying the lower bound. I would consider buying it if I was sure it would solve my problem, so does anyone know if it will work on a matrix of the size with reasonable speed? If not does anyone have any other solution in mind? Thanks very much!
========================

The following is a cheap gradient type algorithm that sometimes works well:


H=abs(A.'*A);
C=sum(H,2);
x=initialValues;

for ii=1:numIterations

 x=x-A.'*(A*x-b)./C;
 x(X<0)=0;

end
  

Tags for this Thread

What are tags?

A tag is like a keyword or category label associated with each thread. Tags make it easier for you to find threads of interest.

Anyone can tag a thread. Tags are public and visible to everyone.

Contact us