Skip to main content

Welcome to probaforms

PyPI version Tests Docs Downloads License: MIT

Probaforms is a python library of conditional Generative Adversarial Networks, Normalizing Flows, Variational Autoencoders and other generative models for tabular data. All models have a sklearn-like interface to enable rapid use in a variety of science and engineering applications.

Implemented conditional models

  • Variational Autoencoder (CVAE)
  • Wasserstein GAN (WGAN)
  • Real NVP

Installation

pip install probaforms

or

git clone https://github.com/HSE-LAMBDA/probaforms.git
cd probaforms
pip install -e .

or

poetry install

Basic usage

(See more examples in the documentation.)

The following code snippet generates a noisy synthetic data, fits a conditional generative model, sample new objects, and displays the results.

from sklearn.datasets import make_moons
import matplotlib.pyplot as plt
from probaforms.models import RealNVP

# generate sample X with conditions C
X, y = make_moons(n_samples=1000, noise=0.1)
C = y.reshape(-1, 1)

# fit nomalizing flow model
model = RealNVP(lr=0.01, n_epochs=100)
model.fit(X, C)

# sample new objects
X_gen = model.sample(C)

# display the results
plt.scatter(X_gen[y==0, 0], X_gen[y==0, 1])
plt.scatter(X_gen[y==1, 0], X_gen[y==1, 1])
plt.show()

Support

Thanks to all our contributors

Metadata

Release files for probaforms 0.2.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for probaforms 0.2.0
File Size Uploaded
probaforms-0.2.0.tar.gz 11.0 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for probaforms 0.2.0
File Interpreter ABI Platform
probaforms-0.2.0-py3-none-any.whl Python 3 none any Details

Total release size: 27.1 kB

Release files / probaforms-0.2.0.tar.gz

Download URL probaforms-0.2.0.tar.gz
Size 11.0 kB
Tags Source
SHA-256 checksum
How to use checksums
335e6df440f2dfb39c6d4daa8419d6ec9a6276108d292f7d2cfa9d7894651de0
BLAKE2b-256 checksum
How to use checksums
03968ff5b784ce7cac023d1f3908d355d756427db844286243fa4cafbea88dba
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release files / probaforms-0.2.0-py3-none-any.whl

Download URL probaforms-0.2.0-py3-none-any.whl
Size 16.1 kB
Tags Python 3
SHA-256 checksum
How to use checksums
e0e54ee791f624d60ff9d06d683c3fa61daa5daec592fc44b0d1ef7ae33c0b66
BLAKE2b-256 checksum
How to use checksums
f6e103d028a8e4da64e7cac0c7974d3a05f047bca55fa73ab0d34b00655ef5b5
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/4.0.2 CPython/3.9.16

Release history Release notifications | RSS feed

This release

0.2.0 This release

2 release files

0.1.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page