Skip to main content

Optimal transport-based tools for data integration.

Reason this release was yanked:

critical issue

Project description

Transmorph (anciently WOTi)

This python package aims to provide an easy interface for integrating datasets using optimal transport (OT)- and Gromov-Wasserstein (GW)-based methods. We plan to extend the package beyond data integration, with additional OT-related unsupervised and semi-supervised methods. Warning: This package is still in an early stage. Feel free to open an issue in case of unexpected behvior.

Installation

Install from source (latest version, may be unstable)

git clone https://github.com/Risitop/transmorph
pip install ./transmorph

Install from PyPi (stable version)

pip install transmorph

Examples

See three example notebooks in examples/ directory.

Usage

This package offers four main integration techniques, two based on OT and two based on GW. Both OT and GW comes in two variants, balanced (similar to SCOT) and unbalanced, using a quadratic program in order to estimate data points weights. These weights are chosen so that the weighted Gaussian mixture distribution is close to be uniform over the dataset.

Assuming two numpy arrays X and Y representing source and target datasets, WOTi can be used in the following way. First, create a Woti object. The scale parameter adjusts kernel bandwidth, and needs some tuning according to cloud sparsity.

import transmorph as tr

X, Y = ... # datasets, np.ndarray
t = tr.Transmorph(method='ot')

Then, simply apply the integration method to project X onto Y.

X_integrated = t.fit_transform(X, Y)

Reference

https://www.biorxiv.org/content/10.1101/2021.05.12.443561v1

Documentation

Work in progress.

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

transmorph-0.0.2.tar.gz (3.1 kB view details)

Uploaded Source

Built Distribution

transmorph-0.0.2-py3-none-any.whl (3.0 kB view details)

Uploaded Python 3

File details

Details for the file transmorph-0.0.2.tar.gz.

File metadata

  • Download URL: transmorph-0.0.2.tar.gz
  • Upload date:
  • Size: 3.1 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.9.5

File hashes

Hashes for transmorph-0.0.2.tar.gz
Algorithm Hash digest
SHA256 6f2070b8f46032b1a55fdb40d783259903b611cde63a4b66869d80afecda35a6
MD5 03d6783b2f2dc4711b48532ebecb4ff6
BLAKE2b-256 5c3773dee71e545860b2e3129654fd876f508c8a1081a95ce5ac2e4d503d39cc

See more details on using hashes here.

File details

Details for the file transmorph-0.0.2-py3-none-any.whl.

File metadata

  • Download URL: transmorph-0.0.2-py3-none-any.whl
  • Upload date:
  • Size: 3.0 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/3.4.1 importlib_metadata/4.0.1 pkginfo/1.7.0 requests/2.25.1 requests-toolbelt/0.9.1 tqdm/4.47.0 CPython/3.9.5

File hashes

Hashes for transmorph-0.0.2-py3-none-any.whl
Algorithm Hash digest
SHA256 63f793b431ecb95c953d0f918952c85d24f02a8202293322bfb3d60d64f7f9d9
MD5 8f6ec4d284bcd13989b7e1c3ba82ac0f
BLAKE2b-256 7986a2f78a73603754aa0077ca21ec74031a05c1b7f8c319680a696c4bdd76ab

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page