hi yarik,

here is my attempt:

https://github.com/satra/scikit-learn/blob/enh/covariance/sklearn/covariance/distance_covariance.py

i'll look at your code in detail later today to understand the uv=True case.

cheers,

satra

On Fri, Jun 15, 2012 at 10:19 AM, Yaroslav Halchenko <[email protected]>wrote:

> I haven't had a chance to play with it extensively but I have a basic
> implementation:
> https://github.com/PyMVPA/PyMVPA/blob/master/mvpa2/misc/dcov.py
> which still lacks statistical assessment, but provides dCov, dCor values
>
> and yes -- it is "inherently multivariate", but since also could be
> useful if applied in a univariate fashion, you can see those uv bool
> arguments.  Implementation as is is very memory hungry (even for
> multivariate case... which shouldn't be the case)
>
> On Fri, 15 Jun 2012, Satrajit Ghosh wrote:
>
> >    hi yarik,
>
> >      hm... interesting -- and there is no comparison against "minimizing
> >      independence"? e.g. dCov measure
> >      [1]http://en.wikipedia.org/wiki/Distance_correlation which is
> really
> >      simple
> >      to estimate and as intuitive as a correlation coefficient
>
> >    thanks for bringing up dCov. have you had a chance to play with it
> (their
> >    R package) [1] /try to implement it from their paper [2]. it seems
> like
> >    dCov, from the paper doesn't apply to 2 vectors, but it can compare
> the
> >    covariance of two datasets, where n_samples>1. their code also allows
> you
> >    to enter two distance matrices into dCor and dCov and dCor(x,x) !=
> >    dCor(x).
> >    i would love if somebody can explain to me how dCor, dCov can be used
> for
> >    2 random vectors.
> >    all that said, i started implementing dCorr/dCov for sklearn and
> stopped
> >    as i couldn't match my output with the R code (i didn't actually look
> at
> >    the source there) and it seemed it wasn't going to be related to
> comparing
> >    two samples.
> >    cheers,
> >    satra
> >    [1]�[2]http://cran.r-project.org/web/packages/energy/index.html
> >    [2]�[3]http://arxiv.org/pdf/0803.4101.pdf
> >    �
> --
> Yaroslav O. Halchenko
> Postdoctoral Fellow,   Department of Psychological and Brain Sciences
> Dartmouth College, 419 Moore Hall, Hinman Box 6207, Hanover, NH 03755
> Phone: +1 (603) 646-9834                       Fax: +1 (603) 646-1419
> WWW:   http://www.linkedin.com/in/yarik
>
>
> ------------------------------------------------------------------------------
> Live Security Virtual Conference
> Exclusive live event will cover all the ways today's security and
> threat landscape has changed and how IT managers can respond. Discussions
> will include endpoint security, mobile security and the latest in malware
> threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
> _______________________________________________
> Scikit-learn-general mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/scikit-learn-general
>
------------------------------------------------------------------------------
Live Security Virtual Conference
Exclusive live event will cover all the ways today's security and 
threat landscape has changed and how IT managers can respond. Discussions 
will include endpoint security, mobile security and the latest in malware 
threats. http://www.accelacomm.com/jaw/sfrnl04242012/114/50122263/
_______________________________________________
Scikit-learn-general mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/scikit-learn-general

Reply via email to