Skip to content

Latest commit

 

History

History
74 lines (56 loc) · 3.64 KB

README.md

File metadata and controls

74 lines (56 loc) · 3.64 KB

build codecov PyPI version DOI Docs

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

If you use this package in your research, please cite the following two sources:

The paper

@misc{crenshaw2024,
      title={Probabilistic Forward Modeling of Galaxy Catalogs with Normalizing Flows}, 
      author={John Franklin Crenshaw and J. Bryce Kalmbach and Alexander Gagliano and Ziang Yan and Andrew J. Connolly and Alex I. Malz and Samuel J. Schmidt and The LSST Dark Energy Science Collaboration},
      year={2024},
      eprint={2405.04740},
      archivePrefix={arXiv},
      primaryClass={astro-ph.IM}
}

The Zenodo deposit

@software{pzflow,
  author       = {Crenshaw, John Franklin and
                  Yan, Ziang and
                  Doster, Vlad},
  title        = {jfcrenshaw/pzflow: v3.1.3},
  month        = feb,
  year         = 2024,
  publisher    = {Zenodo},
  version      = {v3.1.3},
  doi          = {10.5281/zenodo.10710271},
  url          = {https://doi.org/10.5281/zenodo.10710271}
}

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