pyotc

codecov

A python implementations of optimal transport coupling algorithms.

Documentation

Find sphinx documentation here.

Installation

We expect pyotc to be pip-installable across all platforms.

2. Install from github

pip install https://github.com/pyotc/pyotc.git

3. Install for Development

We test in venvs provided by uv via nox. It’s helpful, but not strictly necessary to do the same.

git clone https://github.com/pyotc/pyotc.git
cd pyotc
pip install -e .

uv workflow

Install the uv tool. Then

git clone https://github.com/pyotc/pyotc.git
cd pyotc
uv sync
uv pip install -e .

To verify your installation, run

uv run pytest

Run Tests

With a uv setup one can simply

uv run pytest

Otherwise, in pip installed context with deps met, pytest should behave as expected.

Contributing

Guidelines for contribution to pyotc are provided in CONTRIBUTING.md.

Changelog

A summary of changes and guide to versioning are recoreded in CHANGELOG.md.

Citing this Repository

If you wish to cite our work, please use the following BibTeX code:

@article{yi2025alignment,
  title={Alignment and comparison of directed networks via transition couplings of random walks},
  author={Yi, Bongsoo and O'Connor, Kevin and McGoff, Kevin and Nobel, Andrew B},
  journal={Journal of the Royal Statistical Society Series B: Statistical Methodology},
  pages={qkae085},
  year={2024},
  doi = {10.1093/jrsssb/qkae085}
}