Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/hdembinski/zenflow
Modeling of conditional probability densities with normalizing flows
https://github.com/hdembinski/zenflow
Last synced: about 1 month ago
JSON representation
Modeling of conditional probability densities with normalizing flows
- Host: GitHub
- URL: https://github.com/hdembinski/zenflow
- Owner: HDembinski
- License: mit
- Created: 2024-02-14T09:45:15.000Z (9 months ago)
- Default Branch: main
- Last Pushed: 2024-08-30T16:08:15.000Z (3 months ago)
- Last Synced: 2024-10-06T15:45:45.870Z (about 1 month ago)
- Language: Python
- Homepage:
- Size: 40.3 MB
- Stars: 0
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# zenflow
[![](https://img.shields.io/pypi/v/zenflow.svg)](https://pypi.org/project/zenflow/)
[![Coverage Status](https://coveralls.io/repos/github/HDembinski/zenflow/badge.svg?branch=main)](https://coveralls.io/github/HDembinski/zenflow?branch=main)
[![DOI](https://zenodo.org/badge/757339505.svg)](https://zenodo.org/doi/10.5281/zenodo.13236492)Fast conditional flow-based generative models which are implemented as FLAX modules. Conditional PDFs are supported.
## License
The source code is released under the MIT license.
## Installation
```sh
pip install zenflow
```## Documentation
There is currently no online documentation, but the library has useful docstrings. Please use the docstrings and look into the usage examples in the `examples` folder.
## Citation
If you use this package in a scientific work, please cite us. You can generate citations in your preferred format on the [Zenodo website](https://zenodo.org/doi/10.5281/zenodo.13236492).
## History
This project was originally forked from [PZFlow](https://github.com/jfcrenshaw/pzflow) by [John Franklin Crenshaw]([email protected]), but largely rewritten. PZFlow itself draws from other repositories, which are listed in the PZFlow documentation. I needed a code base which is simple to understand and stripped down to the essentials for my use case. The main differences between PZFlow and zenflow:
* zenflow uses generic JAX arrays for data input and output, while PZFlow enforces the use of Pandas dataframes.
* zenflow implements all trainable objects as FLAX modules, while PZFlow uses JAX primitives.
* zenflow follows a clean functional design inspired by FLAX.
* zenflow is minimalistic and focussed on providing trainable conditional PDFs with the neural spline coupling technique.Because all trainable objects are FLAX modules, including the flow object and all bijectors, one can make new FLAX modules that build on flow objects or bijectors, and train the combination. This, for example, allows one to construct conditional PDFs that use complex models like transformers to provide the conditional input, and train everything together. The examples include an application that uses a Deep Set as conditional input for the PDF.
Features of PZFlow that are not included in zenflow:
* Training on data points with uncertainties.
* Computing marginalized posterior densities. This can be done "by hand", however.
* Bijectors that are not needed for the neural spline coupling approach.
* Supports for periodic variables.Features which are planned:
* Supports for periodic variables.