No BSD License  

4.5

4.5 | 2 ratings Rate this file 8 Downloads (last 30 days) File Size: 2.29 KB File ID: #8157

nnls

by

 

29 Jul 2005 (Updated )

block principal pivoting algorithm

| Watch this File

File Information
Description

solves the linear least squares problem with nonnegative variables using the block principal pivoting algorithm in:
Portugal, Judice and Vicente, A comparison of block pivoting and interior point algorithms for linear least squares problems with nonnegative variables, Mathematics of Computation, 63(1994), pp. 625-643

Acknowledgements

This file inspired Lbfgsb (L Bfgs B) Mex Wrapper.

MATLAB release MATLAB 7.0.4 (R14SP2)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (2)
09 Apr 2007 Greg Reynolds

It works nicely for my matrices of about 1024x20 and is significantly faster than 'lsqnonneg'.

For 100 (random) trials, A is 1024x20, b is 1024x1:
'blocknnls' = 0.686167 seconds
'lsqnonneg' = 5.869711 seconds

13 Aug 2005 John D'Errico

Faster than lsqonneg for some sizes of problems.

Interestingly, my tests show it is slower than lsqnonneg
when the number of unknowns to estimate is small, say 2 or 3 and there are few rows in A. Thus, for size(A) ==
[5,2], lsqnonneg is 3x faster. For size(A) == [100,10],
blocknnls is 3x faster.

Updates
28 Apr 2006

The way the sets F and G are updated in each iteration is corrected.
The permutation of the set is now fixed to avoid different solutions every time the function is used with the same input data. If random required, just uncomment line.

Contact us