Intel® oneAPI Math Kernel Library
Ask questions and share information with other developers who use Intel® Math Kernel Library.
Announcements
This community is designed for sharing of public information. Please do not share Intel or third-party confidential information here.
6588 Discussions

## Which function could solve linear least square with inequality constraints?

Beginner
244 Views

I want to solve X in a linear system A*X=B with a constraint that all elements in X are non-negative. It is a Non-negative Least Squares (NNLS) problem. Do you know which function in the MKL library for this problem? I tried to use trnlspbc_solve(), the Nonlinear Least Squares Problem with Linear Constraints, but it doesn't work well. Any ideas?

3 Replies
Black Belt
244 Views

You may choose a suitable NNLS solver from the list provided at http://plato.asu.edu/sub/nonlsq.html , under the heading "THE CONSTRAINED LSQ-PROBLEM".

Beginner
244 Views

Thank you for your reply, mecej4! I know "Lawson, C.L. and R.J. Hanson, Solving Least Squares Problems, Prentice-Hall, 1974" could solve it. But I prefer to use MKL to do it. Does MKL have any solutions? When I use trnlspbc_solve(), it is time-consuming and the result is a little bit different than NNLS. Any comments about using trnlspbc_solve() to do linear least square problem with constraints?

Black Belt
244 Views

At this point it would be useful to have a working example source code that exhibits slow performance with trnlspbc_solve(). Even a mathematical problem definition would help. I have used trnlsp() a number of times, and it has always performed quite well. Your problem may use specific functions and bounds that trigger a slowdown, which is why a full description is needed.