Skip to main content

dcor

Tests Documentation Status Coverage Status Project Status: Active – The project has reached a stable, usable state and is being actively developed. PyPI - Python Version Pypi version Available in Conda Zenodo DOI

dcor: distance correlation and energy statistics in Python.

E-statistics are functions of distances between statistical observations in metric spaces.

Distance covariance and distance correlation are dependency measures between random vectors introduced in [SRB07] with a simple E-statistic estimator.

This package offers functions for calculating several E-statistics such as:

  • Estimator of the energy distance [SR13].

  • Biased and unbiased estimators of distance covariance and distance correlation [SRB07].

  • Estimators of the partial distance covariance and partial distance covariance [SR14].

It also provides tests based on these E-statistics:

  • Test of homogeneity based on the energy distance.

  • Test of independence based on distance covariance.

Installation

dcor is on PyPi and can be installed using pip:

pip install dcor

It is also available for conda using the conda-forge channel:

conda install -c conda-forge dcor

Previous versions of the package were in the vnmabus channel. This channel will not be updated with new releases, and users are recommended to use the conda-forge channel.

Requirements

dcor is available in Python 3.8 or above in all operating systems. The package dcor depends on the following libraries:

  • numpy

  • numba >= 0.51

  • scipy

  • joblib

Citing dcor

Please, if you find this software useful in your work, reference it citing the following paper:

@article{ramos-carreno+torrecilla_2023_dcor,
  author = {Ramos-Carreño, Carlos and Torrecilla, José L.},
  doi = {10.1016/j.softx.2023.101326},
  journal = {SoftwareX},
  month = {2},
  title = {{dcor: Distance correlation and energy statistics in Python}},
  url = {https://www.sciencedirect.com/science/article/pii/S2352711023000225},
  volume = {22},
  year = {2023},
}

You can additionally cite the software repository itself using:

@misc{ramos-carreno_2022_dcor,
  author = {Ramos-Carreño, Carlos},
  doi = {10.5281/zenodo.3468124},
  month = {3},
  title = {dcor: distance correlation and energy statistics in Python},
  url = {https://github.com/vnmabus/dcor},
  year = {2022}
}

If you want to reference a particular version for reproducibility, check the version-specific DOIs available in Zenodo.

Documentation

The documentation can be found in https://dcor.readthedocs.io/en/latest/?badge=latest

References

[SR13]

Gábor J. Székely and Maria L. Rizzo. Energy statistics: a class of statistics based on distances. Journal of Statistical Planning and Inference, 143(8):1249 – 1272, 2013. URL: http://www.sciencedirect.com/science/article/pii/S0378375813000633, doi:10.1016/j.jspi.2013.03.018.

[SR14]

Gábor J. Székely and Maria L. Rizzo. Partial distance correlation with methods for dissimilarities. The Annals of Statistics, 42(6):2382–2412, 12 2014. doi:10.1214/14-AOS1255.

[SRB07] (1,2)

Gábor J. Székely, Maria L. Rizzo, and Nail K. Bakirov. Measuring and testing dependence by correlation of distances. The Annals of Statistics, 35(6):2769–2794, 12 2007. doi:10.1214/009053607000000505.

Release files for dcor 0.7

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for dcor 0.7
File Size Uploaded
dcor-0.7.tar.gz 69.1 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for dcor 0.7
File Interpreter ABI Platform
dcor-0.7-py3-none-any.whl Python 3 none any Details

Total release size: 113.6 kB

Release files / dcor-0.7.tar.gz

Download URL dcor-0.7.tar.gz
Size 69.1 kB
Tags Source
SHA-256 checksum
How to use checksums
386d408596d7ec39af28b52c89e9fc438c4f13d8ed3d673e2c3b21029f57cbce
BLAKE2b-256 checksum
How to use checksums
14872a3141de80310e503d11d5f23d951c41a7f86aeae2045bbec54a480c748a
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release files / dcor-0.7-py3-none-any.whl

Download URL dcor-0.7-py3-none-any.whl
Size 44.6 kB
Tags Python 3
SHA-256 checksum
How to use checksums
2a5875467d2b554a9d7673e574a26f9ba06fc53f3229d49cd9a18c90d7d25042
BLAKE2b-256 checksum
How to use checksums
a470d82c194d53d684b6e75a228170a36f414cc86f5824693f6b0e443032461d
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.9.25

Release history Release notifications | RSS feed

This release

0.7 This release

2 release files

0.6

2 release files

0.5.7

2 release files

0.5.6

2 release files

0.5.5

2 release files

0.5.3

2 release files

0.5.2

2 release files

0.5.1

2 release files

0.5

2 release files

0.4

2 release files

0.3

2 release files

0.2

2 release files

0.1.5

2 release files

0.1.4

2 release files

0.1.3

2 release files

0.1.2

2 release files

0.1.1

2 release files

0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page