Skip to content

Non-negative least squares

Submitted by Hannes Matuschek

Assigned to Nobody

Link to original bugzilla bug (#655)

Description

Created attachment 380

NNLS implementation

I implemented the NNLS algorithm [1] for Eigen. It is not perfect yet but I think it could be included into the "unsupported" modules of Eigen.

One think that is definitely missing is a check that the Scalar type of the system is real as the NNLS problem is only defined on R^N and I do not know how to do this.

I have tested the code against some simple units test [2] so far and I used it for some larger problems where it produces reasonable results although I have not verified them against some other implementation.

Let me know if I can improve the implementation.

Hannes

[1] "SOLVING LEAST SQUARES PROBLEMS", by

Charles L. Lawson and Richard J. Hanson, Prentice-Hall, 1974  

[2] http://www.turkupetcentre.net/reports/tpcmod0020_app_a.pdf

Attachment 380, "NNLS implementation":

nnls.h

Blocking

#1608