vnmabus / dcor

Distance correlation and related E-statistics in Python
https://dcor.readthedocs.io
MIT License
144 stars 26 forks source link

add support for faster dcor #14

Closed satra closed 4 years ago

satra commented 4 years ago

in this paper: https://arxiv.org/pdf/1810.11332.pdf an O(n log n) version of the algorithm is reported. it may be worthwhile to recode into python.

satra commented 4 years ago

never mind. just saw that this was already implemented in #8.

vnmabus commented 4 years ago

Yes, you can access this functionality using the argument method='MERGESORT'. In https://dcor.readthedocs.io/en/latest/performance.html I compare its performance against the naive algorithm and the other fast method (AVL). Although in the generated documentation appears to beat both methods, in my computer its performance is similar to AVL, and I am not sure why.

I will probably update the algorithm to use MERGESORT by default if possible, as it does not seem to perform worse than AVL and in some machines performs better.

satra commented 4 years ago

thank you @vnmabus