On Feb 3, 2012, at 18:07 , Mathieu Blondel wrote:

> On Fri, Feb 3, 2012 at 11:55 PM, Vlad Niculae <[email protected]> wrote:
> 
>> The scipy NNLS is written in Fortran. I'd like to bench _nls_subproblem 
>> against it.
>> Maybe we could have a cython projected sgd non-negative least square method 
>> with L1 constraints that would support sparse data as well? We discussed 
>> this idea before, but would it be an NNLS solver?
> 
> The easiest would be to add a non_negative=True|False option to
> plain_sgd (the Cython function on which SGDClassifier is relying). In
> the dense case, when an update occurred (the hinge loss doesn't update
> on all iterations), one has to go over all weights and set the
> negative ones to 0. In the sparse case, for efficiency reasons, one
> need to iterate only over the features from the example used to update
> the weight vector.
> 
> But even if this is done, it would still be nice to study the Fortran
> code for the active set method in scipy and see if it can be easily
> ported when X is sparse or not.
> 
>> Would this lead to a sparse NMF?
> 
> I believe NMF is always sparse but L1 regularizations can make it sparser.

Sorry for being vague. NMF indeed tends to generally return sparse 
representations. I meant sparse NMF as in an implementation of NMF that can 
take sparse matrices as inputs (effectively keeping either the larger of W, H 
or both as sparse matrices)

The big picture is that the plain_sgd with non_negative flag will add 
flexibility to more  algorithms, right?

> Mathieu


------------------------------------------------------------------------------
Try before you buy = See our experts in action!
The most comprehensive online learning library for Microsoft developers
is just $99.99! Visual Studio, SharePoint, SQL - plus HTML5, CSS3, MVC3,
Metro Style Apps, more. Free future releases when you subscribe now!
http://p.sf.net/sfu/learndevnow-dev2
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to