etacorpy
A Python package for calculating eta_n, the rank-transform area coverage coefficient of correlation. This is the official repository of the paper (link TBD):
"A coefficient of correlation for continuous random variables based on area coverage"
Installation
Install this library using pip:
pip install etacorpy
Usage
import numpy as np
from etacorpy import calc_eta_n, create_null_dist, area_coverage_independence_test
n = 100
x = np.random.rand(n)
y = np.random.rand(n)
null_dist = create_null_dist(n)
eta_n, p_value = area_coverage_independence_test(x, y, null_dist=null_dist)
print(f'x and y are independent, eta_n = {eta_n}, p_value = {p_value}')
y = np.square(x)
eta_n, p_value = area_coverage_independence_test(x, y, null_dist=null_dist)
print(f'x and y are dependent, eta_n = {eta_n}, p_value = {p_value}')
# If p_value is not needed, you can calculate just eta_n
eta_n_2 = calc_eta_n(x,y)
assert eta_n == eta_n_2
Development
To contribute to this library, first checkout the code. Then create a new virtual environment:
cd etacorpy
python -m venv venv
source venv/bin/activate
Now install the dependencies and test dependencies:
python -m pip install -e '.[test]'
To run the tests:
python -m pytest
Metadata
Release files for etacorpy 0.1.5
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| etacorpy-0.1.5.tar.gz | 9.8 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| etacorpy-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.6 kB
Release files / etacorpy-0.1.5.tar.gz
| Download URL | etacorpy-0.1.5.tar.gz |
|---|---|
| Size | 9.8 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
282f58adfcfb64a4396af8b4d2bbf78ce55e6f11cd4306f4bfafc716fdf6d3eb
|
|
BLAKE2b-256 checksum How to use checksums |
2aa7c19ff764c30d653a9bc84ae59ae28c59b39c667b7e2607a65488db2a9026
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.
Transparency logRelease files / etacorpy-0.1.5-py3-none-any.whl
| Download URL | etacorpy-0.1.5-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
c3f24b022f3c081e176a534d6538cf1bc2d2a59a9753996563371639d7dd74cf
|
|
BLAKE2b-256 checksum How to use checksums |
761f3e128dcdb78726ddbcdc24b3eeef05f1fbd1c8e563a69c9cad8b2a13c78f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.0.1 CPython/3.12.8
|
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
PyPI Publish Attestation
PyPI verified that this artifact, at this checksum, originated from the publisher listed below.
Signed by GitHub Actions, verified by PyPI on Dec 21, 2024.
Transparency log