Skip to main content

dcor: distance correlation and energy statistics in Python.

Project description

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.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

dcor-0.7.tar.gz (69.1 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

dcor-0.7-py3-none-any.whl (44.6 kB view details)

Uploaded Python 3

File details

Details for the file dcor-0.7.tar.gz.

File metadata

  • Download URL: dcor-0.7.tar.gz
  • Upload date:
  • Size: 69.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for dcor-0.7.tar.gz
Algorithm Hash digest
SHA256 386d408596d7ec39af28b52c89e9fc438c4f13d8ed3d673e2c3b21029f57cbce
MD5 775d97e1264d1fbce154ca5d02e73827
BLAKE2b-256 14872a3141de80310e503d11d5f23d951c41a7f86aeae2045bbec54a480c748a

See more details on using hashes here.

File details

Details for the file dcor-0.7-py3-none-any.whl.

File metadata

  • Download URL: dcor-0.7-py3-none-any.whl
  • Upload date:
  • Size: 44.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.9.25

File hashes

Hashes for dcor-0.7-py3-none-any.whl
Algorithm Hash digest
SHA256 2a5875467d2b554a9d7673e574a26f9ba06fc53f3229d49cd9a18c90d7d25042
MD5 3cd17ad3cc8da6166c2e0cba1fe5d42a
BLAKE2b-256 a470d82c194d53d684b6e75a228170a36f414cc86f5824693f6b0e443032461d

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page