The cosine similarity and Pearson correlation are the same if the data is
centered but are different in general.

The routine in SciPy is between two vectors; metrics in scikit-learn are
between matrices.

So +1 to add Pearson correlation to scikit-learn.



On Mon, Mar 23, 2015 at 3:24 PM, Gael Varoquaux <
gael.varoqu...@normalesup.org> wrote:

> On Mon, Mar 23, 2015 at 10:27:00AM +0530, Vinayak Mehta wrote:
> > > I believe that it is the same thing as cosine similarity. If that's
> > > indeed the case, you could add a note in the cosine similarity
> docstring
> > > to stress it.
>
> > I think it is somewhat different from cosine similarity.
>
> Then you'll have to tell me how, because I am being dense and I don't see
> the difference.
>
> > > I remember there is an off-the-shelf function in scipy.stats called
> > > pearsonr. You don't have to implement it on your own.
>
> > Yeah, I know about that. I thought of suggesting this addition after I
> > saw that we a newton_cg as comparted to scipy's fmin_ncg. :)
>
> Our newton_cg actually has a different implementation than scipy's
> fmin_ncg and these differences are necessary to make the logistic
> regression significantly faster.
>
> Gaƫl
>
>
> ------------------------------------------------------------------------------
> Dive into the World of Parallel Programming The Go Parallel Website,
> sponsored
> by Intel and developed in partnership with Slashdot Media, is your hub for
> all
> things parallel software development, from weekly thought leadership blogs
> to
> news, videos, case studies, tutorials and more. Take a look and join the
> conversation now. http://goparallel.sourceforge.net/
> _______________________________________________
> Scikit-learn-general mailing list
> Scikit-learn-general@lists.sourceforge.net
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Dive into the World of Parallel Programming The Go Parallel Website, sponsored
by Intel and developed in partnership with Slashdot Media, is your hub for all
things parallel software development, from weekly thought leadership blogs to
news, videos, case studies, tutorials and more. Take a look and join the 
conversation now. http://goparallel.sourceforge.net/
_______________________________________________
Scikit-learn-general mailing list
Scikit-learn-general@lists.sourceforge.net
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to