Skip to main content

sinflow

License: GPL v3 Documentation Status

sinflow is a Python implementation of the sliced iterative normalizing flow (SINF) algorithm for density estimation and sampling. The package has minimal dependencies, requiring only numpy and scipy. The code is designed to be easy to use and flexible, with a focus on performance and scalability. The package is designed to be used in a similar way to scikit-learn, with a simple and consistent API.

Documentation

Read the docs at sinflow.readthedocs.io for more information, examples and tutorials.

Installation

To install sinflow using pip run:

pip install sinflow

or, to install from source:

git clone https://github.com/minaskar/sinflow.git
cd pocomc
python setup.py install

Basic example

For instance, if you wanted to draw samples from a 10-dimensional Rosenbrock distribution with a uniform prior, you would do something like:

import sinflow as sf
import numpy as np
from sklearn.datasets import make_moons

# Generate some data
x, _ = make_moons(n_samples=5000, noise=0.15)

# Fit a normalizing flow model
flow = sf.Flow()
flow.fit(x)

# Sample from the model
samples = flow.sample(1000)

# Evaluate the log-likelihood of the samples
log_prob = flow.log_prob(samples)

# Evaluate the forward transformation
z, log_det_forward = flow.forward(x)

# Invert the transformation
x_reconstructed, log_det_inverse = flow.inverse(z)

Attribution & Citation

Please cite the following paper if you found this code useful in your research:

@article{karamanis2024sinflow,
    title={},
    author={},
    journal={},
    year={2024}
}

Licence

Copyright 2024-Now Minas Karamanis and contributors.

sinflow is free software made available under the GPL-3.0 License. For details see the LICENSE file.

Metadata

Release files for sinflow 0.1.5

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

Source distribution (sdist)

Source distribution for sinflow 0.1.5
File Size Uploaded Provenance Actions
sinflow-0.1.5.tar.gz 29.4 kB Without provenance Details for sinflow-0.1.5.tar.gz

Built distribution (wheel)

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

Total release size: 57.1 kB

Release files / sinflow-0.1.5.tar.gz

Download URL sinflow-0.1.5.tar.gz
Size 29.4 kB
Tags Source
SHA-256 checksum
How to use checksums
837a806923f8858783b1d38953e8d3440d104668677a7711afbb69a591a74ed0
BLAKE2b-256 checksum
How to use checksums
fd7f6283e9479305765a6703ec120be37e795443ef914cf7e15cb200cc4ace66
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Release files / sinflow-0.1.5-py3-none-any.whl

Download URL sinflow-0.1.5-py3-none-any.whl
Size 27.7 kB
Tags Python 3
SHA-256 checksum
How to use checksums
d0cfae17f3a1e7e87a9a0941ecf8b1f66dfc55c9881e1ff29ddc0a7129b9a308
BLAKE2b-256 checksum
How to use checksums
d6926d6d458b6c3ed5773ef0eb2ce1d1e504cd3edc08a08bf74eb5632e88faf9
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/5.1.1 CPython/3.12.7

Security for sinflow 0.1.5

Provenance

Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.

No provenance found

None of the files in this release were uploaded with provenance metadata.

A note on package security

PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.

To learn more about protecting yourself from malicious actors, visit our package security documentation.

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