A Python package for calculating RTAC, the rank-transform area coverage coefficient of correlation.
Project description
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
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file rtacpy-0.1.5.tar.gz.
File metadata
- Download URL: rtacpy-0.1.5.tar.gz
- Upload date:
- Size: 9.9 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
d1933f9b10720744b276d8af2c4e020cc907a38b463f17854b27b9ffce4a4a04
|
|
| MD5 |
0c5481c989f865df27535414257a06f5
|
|
| BLAKE2b-256 |
75a2db3383b3e40e21600df66ce193d5b978e0b456b08df4fcfb70a9dc59e06e
|
Provenance
The following attestation bundles were made for rtacpy-0.1.5.tar.gz:
Publisher:
publish.yml on itaipelles/rtacpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtacpy-0.1.5.tar.gz -
Subject digest:
d1933f9b10720744b276d8af2c4e020cc907a38b463f17854b27b9ffce4a4a04 - Sigstore transparency entry: 202669192
- Sigstore integration time:
-
Permalink:
itaipelles/rtacpy@d2f6dc54080ecae5095eca4b9070327a868a6c34 -
Branch / Tag:
refs/tags/v0.1.5_rtac - Owner: https://github.com/itaipelles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2f6dc54080ecae5095eca4b9070327a868a6c34 -
Trigger Event:
release
-
Statement type:
File details
Details for the file rtacpy-0.1.5-py3-none-any.whl.
File metadata
- Download URL: rtacpy-0.1.5-py3-none-any.whl
- Upload date:
- Size: 9.8 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.12.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
92281cdc07f0d415168617bbe9dedec8bbfc6c9eddc4f7e5b4fe9019bc51772a
|
|
| MD5 |
dfd9ad346cb1f14fc057ef59b08a061e
|
|
| BLAKE2b-256 |
d1fe7ab06f661b8f33afa7bfac4f2e4050ca29172242f3edc086faf3d5b50bae
|
Provenance
The following attestation bundles were made for rtacpy-0.1.5-py3-none-any.whl:
Publisher:
publish.yml on itaipelles/rtacpy
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
rtacpy-0.1.5-py3-none-any.whl -
Subject digest:
92281cdc07f0d415168617bbe9dedec8bbfc6c9eddc4f7e5b4fe9019bc51772a - Sigstore transparency entry: 202669196
- Sigstore integration time:
-
Permalink:
itaipelles/rtacpy@d2f6dc54080ecae5095eca4b9070327a868a6c34 -
Branch / Tag:
refs/tags/v0.1.5_rtac - Owner: https://github.com/itaipelles
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish.yml@d2f6dc54080ecae5095eca4b9070327a868a6c34 -
Trigger Event:
release
-
Statement type: