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
@ARTICLE{2024AJ....168...80C,
author = {{Crenshaw}, John Franklin and {Kalmbach}, J. Bryce and {Gagliano}, Alexander and {Yan}, Ziang and {Connolly}, Andrew J. and {Malz}, Alex I. and {Schmidt}, Samuel J. and {The LSST Dark Energy Science Collaboration}},
title = "{Probabilistic Forward Modeling of Galaxy Catalogs with Normalizing Flows}",
journal = {\aj},
keywords = {Neural networks, Galaxy photometry, Surveys, Computational methods, 1933, 611, 1671, 1965, Astrophysics - Instrumentation and Methods for Astrophysics, Astrophysics - Cosmology and Nongalactic Astrophysics},
year = 2024,
month = aug,
volume = {168},
number = {2},
eid = {80},
pages = {80},
doi = {10.3847/1538-3881/ad54bf},
archivePrefix = {arXiv},
eprint = {2405.04740},
primaryClass = {astro-ph.IM},
adsurl = {https://ui.adsabs.harvard.edu/abs/2024AJ....168...80C},
adsnote = {Provided by the SAO/NASA Astrophysics Data System}
}
- The Zenodo deposit associated with the version number you used. The Zenodo deposit
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
Metadata
Release files for pzflow 4.0.0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pzflow-4.0.0.tar.gz | 8.7 MB | Without provenance | Details for pzflow-4.0.0.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pzflow-4.0.0-py3-none-any.whl | Python 3 | none | any | Details for pzflow-4.0.0-py3-none-any.whl |
Total release size: 17.4 MB
Release files / pzflow-4.0.0.tar.gz
| Download URL | pzflow-4.0.0.tar.gz |
|---|---|
| Size | 8.7 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
c3fa595a58af278d42bc41dc0b1d4c98dcc271dd51e872eb1b9273cb234b714a
|
|
BLAKE2b-256 checksum How to use checksums |
79abfb44083de9070ec38a8ac49c85c1064fb09bc3f0f72b0839aa0efa243d39
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.3 Darwin/24.6.0
|
Release files / pzflow-4.0.0-py3-none-any.whl
| Download URL | pzflow-4.0.0-py3-none-any.whl |
|---|---|
| Size | 8.7 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
df593c6849387fc5a9f97175d887db1e966a551fd4787f37312d0eaf0a89401d
|
|
BLAKE2b-256 checksum How to use checksums |
83aee82e55ea0ceb5d2a337714b691dc1022ed6251d705f49e437ae3bb42bb43
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
poetry/2.3.2 CPython/3.14.3 Darwin/24.6.0
|
Security for pzflow 4.0.0
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.