I am planning to work on NIPALS after the 0.15 sklearn release  - there are
several good papers I will try to work with and implement.

Simple, high level description:
http://www.vias.org/tmdatanaleng/dd_nipals_algo.html
Simple MATLAB (will start with this first likely):
http://www.cdpcenter.org/files/plsr/nipals.html
Parallel Gram-Schmidt (seems pretty great, if the easy version needs
speed): http://arxiv.org/pdf/0811.1081.pdf

Do you have other resources for implementation details or implementations
that you have used in the past? I think there was an old PR or issue for it
somewhere on GitHub, but I can't seem to find the discussion.

I have not looked at the PLS code before - maybe someone more familiar can
comment on your previous comment w.r.t. covariance vs. correlation.




On Thu, Jun 5, 2014 at 2:08 AM, Luca Puggini <lucapug...@gmail.com> wrote:

>
> Hi,
> I was looking to the code in the cross-decomposition section.  In PLS the
> PCs are computed  in order to maximize the correlation between X and y and
> not to maximize the covariance of X.
>
> def _nipals_twoblocks_inner_loop(X, Y, mode="A", max_iter=500, tol=1e-06,
>                                  norm_y_weights=False):
>     """Inner loop of the iterative NIPALS algorithm.
>
>     Provides an alternative to the svd(X'Y); returns the first left and right
>     singular vectors of X'Y.  See PLS for the meaning of the parameters.  It 
> is
>     similar to the Power method for determining the eigenvectors and
>     eigenvalues of a X'Y.
>     """
>
> In my opinion a standard implementation of Nipals PCA would be useful for 
> sklearn and probably easy to develop
>
> Best,
>
> Luca
>
>
> On Mon, Jun 02, 2014 at 12:27:34AM +0100, Luca Puggini wrote:
>> > This is a good alternative to SVD and it is much faster in situations
>> where we
>> > have a lot of variables and we are interested only in a small number of
>> > components.
>> > This is a well known and tested algorithm and I was actually surprised
>> when I
>> > discovered that it is not in sklearn.? (Maybe it has been replaced by a
>> faster
>> > alternative?)
>>
>> It is in scikit-learn, I believe, but written in such a way that nobody
>> finds it are uses it (there are a few lessons to be learned there :) ):
>> inside sklearn.cross_decomposition, you'll find some NIPALS.
>>
>> G
>>
>>
>>
>
>
> ------------------------------------------------------------------------------
> Learn Graph Databases - Download FREE O'Reilly Book
> "Graph Databases" is the definitive new guide to graph databases and their
> applications. Written by three acclaimed leaders in the field,
> this first edition is now available. Download your free book today!
> http://p.sf.net/sfu/NeoTech
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
>
------------------------------------------------------------------------------
Learn Graph Databases - Download FREE O'Reilly Book
"Graph Databases" is the definitive new guide to graph databases and their 
applications. Written by three acclaimed leaders in the field, 
this first edition is now available. Download your free book today!
http://p.sf.net/sfu/NeoTech
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to