Code covered by the BSD License  

Highlights from
Distance correlation

4.0

4.0 | 1 rating Rate this file 34 Downloads (last 30 days) File Size: 1.48 KB File ID: #39905

Distance correlation

by

 

Distance correlation calculation

| Watch this File

File Information
Description

This function calculates the distance correlation between two samples x and y.

It is especially useful when x and y have weak linear dependence but strong nonlinear dependence.

For example, if
x = -10:10; x = x'
y = x.^2;
then corr(x,y) is approximately zero. However, the distance correlation between x and y is nearly 0.5.

Note: distance correlation is zero if and only if x and y are statistically independent.

Author: Shen Liu
Date: 18/01/2013
Reference: http://en.wikipedia.org/wiki/Distance_correlation

Required Products MATLAB
MATLAB release MATLAB 7.14 (R2012a)
Tags for This File   Please login to tag files.
Please login to add a comment or rating.
Comments and Ratings (3)
13 Jun 2014 Jorge

What is he reason for validation of dimension?

13 Jun 2014 Jorge

What is he reason for validation of dimension?

13 Jun 2014 precuneus

Using bsxfun you could get this function more efficient, e.g.
A = a - bsxfun(@plus,mean(a),mean(a,2))+mean(a(:));

Contact us