A package to compute optimal transport based dependency measures such as the transport correlation
Project description
Transport Dependency
This package provides a few simple functions to compute the transport correlation and other optimal transport based dependency measures as defined here: Transport dependency: Optimal transport based dependency measures.
Pip installation
Since the library relies on the Python Optimal Transport package it is necessesary to first install some dependencies separately with the comand:
pip install numpy scipy Cython
You can then install the package by typing:
pip install transport_dependency
Short example
# Compute transport correlation and test for independence
from transport_dependency import tcor, permutation_test
x = [[1, 2, 3],
[4, 5, 6],
[7, 8., 9]]
y = [1, 0, 0.3]
res = tcor(x, y)
test = permutation_test(x, y, coef=tcor)
p_val = test["p_val"]
References
[1] . G. Nies, T. Staudt, and A. Munk. Transport dependency: Optimal transport based dependency measures arXiv Preprint, 2021.
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 transport_dependency-0.0.1.tar.gz.
File metadata
- Download URL: transport_dependency-0.0.1.tar.gz
- Upload date:
- Size: 6.3 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
91a63b9c635f1fb4fe32c1713f84ec2bad9516cfca546ea790c75d3182d7471c
|
|
| MD5 |
4bb44cca25adff767dc1e12c910af69f
|
|
| BLAKE2b-256 |
3e6bb495026a06798c26dfe5bfef9d746e43f1815690845ce8d74b795126fa24
|
File details
Details for the file transport_dependency-0.0.1-py3-none-any.whl.
File metadata
- Download URL: transport_dependency-0.0.1-py3-none-any.whl
- Upload date:
- Size: 7.9 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/3.8.0 pkginfo/1.8.2 readme-renderer/33.0 requests/2.27.1 requests-toolbelt/0.9.1 urllib3/1.26.8 tqdm/4.63.0 importlib-metadata/4.8.1 keyring/23.4.1 rfc3986/1.5.0 colorama/0.4.4 CPython/3.6.9
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
bd2cce8a6e6b78ca2a4ad6a3aa2e641a3b0116db698300616194477d2c5ddc23
|
|
| MD5 |
78958fcd47a1f3c10ab1119db813c32a
|
|
| BLAKE2b-256 |
2ae9e9ad18b75fc6b20d2dcc73bfd3161c8d186aad92bd7f9b56b76095c3014d
|