Quantcast

Non-negative least squares method

classic Classic list List threaded Threaded
13 messages Options
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Non-negative least squares method

Jeevan Baretto
I was looking for the non-negative least squares method in scipy and couldn't find one. Can anyone help me out with this?

Thanks,
Jeevan

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

dmitrey.kroshko
Afaik scipy & numpy has no the one, mb bvls from scikits.openopt can be
helpful.
Regards, D.

Jeevan Baretto wrote:

> I was looking for the non-negative least squares method in scipy and
> couldn't find one. Can anyone help me out with this?
>
> Thanks,
> Jeevan
> ------------------------------------------------------------------------
>
> _______________________________________________
> SciPy-user mailing list
> [hidden email]
> http://projects.scipy.org/mailman/listinfo/scipy-user
>  

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Nils Wagner-2
In reply to this post by Jeevan Baretto
On Thu, 10 Apr 2008 22:21:59 +0530
  "Jeevan Baretto" <[hidden email]> wrote:
> I was looking for the non-negative least squares method
>in scipy and
> couldn't find one. Can anyone help me out with this?
>
> Thanks,
> Jeevan

AFAIK, this is on the TODO list in the Openopt framework

See

http://scipy.org/scipy/scikits/wiki/OpenOptTODO

Dmitrey, correct me if I am missing something.

http://lib.stat.cmu.edu/general/bvls

Nils
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Gael Varoquaux
In reply to this post by dmitrey.kroshko
On Thu, Apr 10, 2008 at 08:24:23PM +0300, dmitrey wrote:
> Afaik scipy & numpy has no the one, mb bvls from scikits.openopt can be
> helpful.
> Regards, D.

Can't this be done with a cobyla (constraint optimisation, can be found
in scipy.optimise) ?

Cheers,

Gaël

> Jeevan Baretto wrote:
> > I was looking for the non-negative least squares method in scipy and
> > couldn't find one. Can anyone help me out with this?

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Bing Jian
In reply to this post by Jeevan Baretto
Hi Jeevan,
   I have a  python wrapper of the following NNLS implementation
     http://www.cs.utexas.edu/~suvrit/work/progs/nnls.html
after asking the same question in this mailing list.  (google "scipy NNLS")
Klaus Schuch also kindly sent me his implementation in numpy.
If you would like to try my implementation, please let me know.

Bing

On Thu, Apr 10, 2008 at 12:51 PM, Jeevan Baretto <[hidden email]> wrote:
I was looking for the non-negative least squares method in scipy and couldn't find one. Can anyone help me out with this?

Thanks,
Jeevan

_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user



_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

dmitrey.kroshko
In reply to this post by Nils Wagner-2
Nils Wagner wrote:

> On Thu, 10 Apr 2008 22:21:59 +0530
>   "Jeevan Baretto" <[hidden email]> wrote:
>  
>> I was looking for the non-negative least squares method
>> in scipy and
>> couldn't find one. Can anyone help me out with this?
>>
>> Thanks,
>> Jeevan
>>    
>
> AFAIK, this is on the TODO list in the Openopt framework
>
> See
>
> http://scipy.org/scipy/scikits/wiki/OpenOptTODO
>
> Dmitrey, correct me if I am missing something.
>  
What do you mean? Connecting bvls to scipy? I had explained that I'm not
skilled enough for now in f2py to provide callback function (to enable
OO graphic output), so I'm not working on the task for now.
> http://lib.stat.cmu.edu/general/bvls
>
> Nils
Regards, D.
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

dmitrey.kroshko
In reply to this post by Bing Jian
Bing wrote:

> Hi Jeevan,
>    I have a  python wrapper of the following NNLS implementation
>      http://www.cs.utexas.edu/~suvrit/work/progs/nnls.html 
> <http://www.cs.utexas.edu/%7Esuvrit/work/progs/nnls.html>
> after asking the same question in this mailing list.  (google "scipy
> NNLS")
> Klaus Schuch also kindly sent me his implementation in numpy.
> If you would like to try my implementation, please let me know.
>
> Bing
Afaik (mb I'm wrong) NNLS is just a successor of bvls (latter can handle
lb-ub while former non-zeros only).
D.
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

dmitrey.kroshko
In reply to this post by Gael Varoquaux
Gael Varoquaux wrote:

> On Thu, Apr 10, 2008 at 08:24:23PM +0300, dmitrey wrote:
>  
>> Afaik scipy & numpy has no the one, mb bvls from scikits.openopt can be
>> helpful.
>> Regards, D.
>>    
>
> Can't this be done with a cobyla (constraint optimisation, can be found
> in scipy.optimise) ?
>  
Yes, of course, but cobyla is not specialized solver for the LLS
problem. scipy lbfgsb could be much more appropriate, since it can
handle derivatives, that are easy to compute here.

However, even the one fails to solve rather large-scale problems (yields
sufficiently worse obj func value), I had mentioned the issue here:
http://openopt.blogspot.com/2008/03/new-llsp-solver-bvls.html
If you have OO installed, you can see /examples/llsp_2.py for benchmark
scipy_lbfgsb (or any other OO NLP solver, btw I hadn't ALGENCAN checked,
mb it works better) vs bvls, try different N = 10, 50, etc.

D.
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Gael Varoquaux
In reply to this post by dmitrey.kroshko
On Thu, Apr 10, 2008 at 10:39:46PM +0300, dmitrey wrote:
> What do you mean? Connecting bvls to scipy? I had explained that I'm not
> skilled enough for now in f2py to provide callback function (to enable
> OO graphic output), so I'm not working on the task for now.

What to you mean by graphic output? I don't see what kind of graphic
output should go in a numerical algorithm.

Cheers,

Gaël
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Matthieu Brucher-2


2008/4/10, Gael Varoquaux <[hidden email]>:
On Thu, Apr 10, 2008 at 10:39:46PM +0300, dmitrey wrote:
> What do you mean? Connecting bvls to scipy? I had explained that I'm not
> skilled enough for now in f2py to provide callback function (to enable
> OO graphic output), so I'm not working on the task for now.


What to you mean by graphic output? I don't see what kind of graphic
output should go in a numerical algorithm.

If people want, they can have graphic output (see the examples, if you want). It can be very usefull to track the evolution of the optimization.

Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Gael Varoquaux
On Thu, Apr 10, 2008 at 10:43:28PM +0200, Matthieu Brucher wrote:
>    If people want, they can have graphic output (see the examples, if you
>    want). It can be very usefull to track the evolution of the optimization.

Yes, I agree, but coupling this in scientific algorithms to heavily seems
a very very bad idea, IMHO. I think it should be made possible to get a
package with not one line related to graphics, or plotting, and of course
no printing on the screen.

Now adding the option of passing a few callbacks to do the plotting, but
not giving these callbacks in the core package is a different story.

Cheers,

Gaël
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Matthieu Brucher-2


2008/4/10, Gael Varoquaux <[hidden email]>:
On Thu, Apr 10, 2008 at 10:43:28PM +0200, Matthieu Brucher wrote:
>    If people want, they can have graphic output (see the examples, if you
>    want). It can be very usefull to track the evolution of the optimization.


Yes, I agree, but coupling this in scientific algorithms to heavily seems
a very very bad idea, IMHO. I think it should be made possible to get a
package with not one line related to graphics, or plotting, and of course
no printing on the screen.

Now adding the option of passing a few callbacks to do the plotting, but
not giving these callbacks in the core package is a different story.

I think that is what dmitrey does. But as he provides a specific interface to a lot of different solvers, providing a half-baked wrapper to bvls is not what he wants, because people expect the full interface ;)

Matthieu
--
French PhD student
Website : http://matthieu-brucher.developpez.com/
Blogs : http://matt.eifelle.com and http://blog.developpez.com/?blog=92
LinkedIn : http://www.linkedin.com/in/matthieubrucher
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Reply | Threaded
Open this post in threaded view
|  
Report Content as Inappropriate

Re: Non-negative least squares method

Gael Varoquaux
On Thu, Apr 10, 2008 at 11:35:10PM +0200, Matthieu Brucher wrote:
>    I think that is what dmitrey does. But as he provides a specific interface
>    to a lot of different solvers, providing a half-baked wrapper to bvls is
>    not what he wants, because people expect the full interface ;)

Great. I was asking the question because I was curious to know what was
the issue. I had sort of guess it could be this, but I wasn't too sure,
and I thought I might have overlooked something.

Thanks,

Gaël
_______________________________________________
SciPy-user mailing list
[hidden email]
http://projects.scipy.org/mailman/listinfo/scipy-user
Loading...