PZFlow
PZFlow is a python package for probabilistic modeling of tabular data with normalizing flows.
If your data consists of continuous variables that can be put into a Pandas DataFrame, pzflow can model the joint probability distribution of your data set.
The Flow
class makes building and training a normalizing flow simple.
It also allows you to easily sample from the normalizing flow (e.g., for forward modeling or data augmentation), and calculate posteriors over any of your variables.
There are several tutorial notebooks in the docs.
Installation
See the instructions in the docs.
Citation
We are preparing a paper on pzflow. If you use this package in your research, please check back here for a citation before publication. In the meantime, please cite the Zenodo release.
Sources
PZFlow was originally designed for forward modeling of photometric redshifts as a part of the Creation Module of the DESC RAIL project. The idea to use normalizing flows for photometric redshifts originated with Bryce Kalmbach. The earliest version of the normalizing flow in RAIL was based on a notebook by Francois Lanusse and included contributions from Alex Malz.
The functional jax structure of the bijectors was originally based on jax-flows
by Chris Waites. The implementation of the Neural Spline Coupling is largely based on the Tensorflow implementation, with some inspiration from nflows
.
Neural Spline Flows are based on the following papers:
NICE: Non-linear Independent Components Estimation\ Laurent Dinh, David Krueger, Yoshua Bengio\ arXiv:1410.8516
Density estimation using Real NVP\ Laurent Dinh, Jascha Sohl-Dickstein, Samy Bengio\ arXiv:1605.08803
Neural Spline Flows\ Conor Durkan, Artur Bekasov, Iain Murray, George Papamakarios\ arXiv:1906.04032