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 | Provenance | Actions |
|---|---|---|---|---|
| etacorpy-0.1.5.tar.gz | 9.8 kB | With provenance | Details for etacorpy-0.1.5.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| etacorpy-0.1.5-py3-none-any.whl | Python 3 | none | any | Details for etacorpy-0.1.5-py3-none-any.whl |
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 logSecurity for etacorpy 0.1.5
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.
Full provenance
Both files in this release have been uploaded with provenance metadata.
Attestation for etacorpy-0.1.5.tar.gz
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 logA note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.