rtacpy
A Python package for calculating RTAC, 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 rtacpy
Usage
import numpy as np
from rtacpy import calc_rtac, 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)
rtac, p_value = area_coverage_independence_test(x, y, null_dist=null_dist)
print(f'x and y are independent, rtac = {rtac}, p_value = {p_value}')
y = np.square(x)
rtac, p_value = area_coverage_independence_test(x, y, null_dist=null_dist)
print(f'x and y are dependent, rtac = {rtac}, p_value = {p_value}')
# If p_value is not needed, you can calculate just rtac
rtac_2 = calc_rtac(x,y)
assert rtac == rtac_2
Development
To contribute to this library, first checkout the code. Then create a new virtual environment:
cd rtacpy
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 rtacpy 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 | |
|---|---|---|---|
| rtacpy-0.1.5.tar.gz | 9.9 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| rtacpy-0.1.5-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 19.7 kB
Release files / rtacpy-0.1.5.tar.gz
| Download URL | rtacpy-0.1.5.tar.gz |
|---|---|
| Size | 9.9 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
d1933f9b10720744b276d8af2c4e020cc907a38b463f17854b27b9ffce4a4a04
|
|
BLAKE2b-256 checksum How to use checksums |
75a2db3383b3e40e21600df66ce193d5b978e0b456b08df4fcfb70a9dc59e06e
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Apr 25, 2025.
Transparency logRelease files / rtacpy-0.1.5-py3-none-any.whl
| Download URL | rtacpy-0.1.5-py3-none-any.whl |
|---|---|
| Size | 9.8 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
92281cdc07f0d415168617bbe9dedec8bbfc6c9eddc4f7e5b4fe9019bc51772a
|
|
BLAKE2b-256 checksum How to use checksums |
d1fe7ab06f661b8f33afa7bfac4f2e4050ca29172242f3edc086faf3d5b50bae
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
Yes |
| Uploaded via |
twine/6.1.0 CPython/3.12.9
|
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 Apr 25, 2025.
Transparency log