Daniel Lepage <dplepage <at> gmail.com> writes:
Hi all, Does scipy have a function analogous to Matlab's lsqlin? I need to solve two problems of the form Ax = b, one subject to the constraint that 0 <= x, and one subject to 0 <= x <= 1. The first case is handled by scipy.optimize.nnls, but it doesn't support the second. I know that scipy.optimize includes several constrained optimization routines, but AFAICT they're all aimed at minimizing arbitrary functions, and as such I'd expect them to be far slower than an actual linear solver. Is there such a constrained linear solver in scipy (or numpy, or scikits.*, etc.)?
Even better would be a constrained matrix factorization routine, i.e. that solves AX = B for X with A, X and B all being matrices, subject to 0 <= X <= 1, but obviously you can construct the latter from the former, so the former would suffice.
Thanks, Dan Lepage
Openopt has a BVLS wrapper, which is bounded values linear square solver. You also could wrap bvls.f with fwrap. Is there any intrest to include bvls in scipy.optimize? I remember to saw a constrained matrix facorization routine for python, but i forget where :(. Till Stensitzki