Distance covariance and distance correlation have been widely adopted in measuring dependence of a pair of random variables or random vectors. If the computation of distance covariance and distance correlation is implemented directly accordingly to its definition then its computational complexity is O($n^2$) which is a disadvantage compared to other faster methods. In this paper we show that the computation of distance covariance and distance correlation of real valued random variables can be implemented by an O(n log n) algorithm and this is comparable to other computationally efficient algorithms. The new formula we derive for an unbiased estimator for squared distance covariance turns out to be a U-statistic. This fact implies some nice asymptotic properties that were derived before via more complex methods. We apply the fast computing algorithm to some synthetic data. Our work will make distance correlation applicable to a much wider class of applications.
A fast algorithm for computing distance correlation
经典的相关性度量,如Pearson相关性、Spearman的$ρ$和Kendall的$τ$只能检测单调或线性相关性。为了克服这些局限性,Szekely et al.(2007)提出了距离协方差作为联合特征函数和边缘分布的乘积之间的加权$L_2$距离。距离协方差是$0$当且仅当两个随机向量${X}$和${Y}$是独立的。当样本量足够大时,该度量有能力检测依赖结构的存在。他们进一步表明,样本距离协方差可以简单地从修改的欧几里得距离计算,这通常需要$\mathcal{O}(n^2)$成本。二次计算时间极大地限制了距离协方差对大数据的应用。本文提出了一个简单的精确$\mathcal{O}(n\log(n))$算法来计算两个单变量随机变量之间的样本距离协方差。该方法基本上由两个排序步骤组成,因此易于实现。实验结果表明,该算法是显着的速度比国家的最先进的方法。该算法的速度将使研究人员能够在大型数据集中探索复杂的依赖结构。
High-Dimensional Sparse Bayesian Learning without Covariance Matrices
Harvard University(哈佛大学);Massachusetts Institute of Technology(麻省理工学院);Athinoula A. Martinos Center for Biomedical Imaging(阿瑟努拉·A·马蒂诺斯生物医学成像中心);Harvard Medical School(哈佛医学院)