Name | zenflow JSON |
Version |
0.2.2
JSON |
| download |
home_page | None |
Summary | Learn distributions with normalizing flows. |
upload_time | 2025-01-22 16:29:12 |
maintainer | None |
docs_url | None |
author | Hans Dembinski |
requires_python | >=3.9 |
license | None |
keywords |
|
VCS |
|
bugtrack_url |
|
requirements |
No requirements were recorded.
|
Travis-CI |
No Travis.
|
coveralls test coverage |
No coveralls.
|
# 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](jfcrenshaw@gmail.com), 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.
* Support for periodic variables.
Features which are planned:
* Support for periodic variables.
Raw data
{
"_id": null,
"home_page": null,
"name": "zenflow",
"maintainer": null,
"docs_url": null,
"requires_python": ">=3.9",
"maintainer_email": null,
"keywords": null,
"author": "Hans Dembinski",
"author_email": "hans.dembinski@gmail.com",
"download_url": "https://files.pythonhosted.org/packages/98/26/1d8dd47159635c9e469f6347818098c5ba2144af34707da7017fb802c14c/zenflow-0.2.2.tar.gz",
"platform": null,
"description": "# zenflow\n\n[![](https://img.shields.io/pypi/v/zenflow.svg)](https://pypi.org/project/zenflow/)\n[![Coverage Status](https://coveralls.io/repos/github/HDembinski/zenflow/badge.svg?branch=main)](https://coveralls.io/github/HDembinski/zenflow?branch=main)\n[![DOI](https://zenodo.org/badge/757339505.svg)](https://zenodo.org/doi/10.5281/zenodo.13236492)\n\nFast conditional flow-based generative models which are implemented as FLAX modules. Conditional PDFs are supported.\n\n## License\n\nThe source code is released under the MIT license.\n\n## Installation\n\n```sh\npip install zenflow\n```\n\n## Documentation\n\nThere 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.\n\n## Citation\n\nIf 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).\n\n## History\n\nThis project was originally forked from [PZFlow](https://github.com/jfcrenshaw/pzflow) by [John Franklin Crenshaw](jfcrenshaw@gmail.com), 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:\n\n* zenflow uses generic JAX arrays for data input and output, while PZFlow enforces the use of Pandas dataframes.\n* zenflow implements all trainable objects as FLAX modules, while PZFlow uses JAX primitives.\n* zenflow follows a clean functional design inspired by FLAX.\n* zenflow is minimalistic and focussed on providing trainable conditional PDFs with the neural spline coupling technique.\n\nBecause 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.\n\nFeatures of PZFlow that are not included in zenflow:\n* Training on data points with uncertainties.\n* Computing marginalized posterior densities. This can be done \"by hand\", however.\n* Bijectors that are not needed for the neural spline coupling approach.\n* Support for periodic variables.\n\nFeatures which are planned:\n* Support for periodic variables.\n",
"bugtrack_url": null,
"license": null,
"summary": "Learn distributions with normalizing flows.",
"version": "0.2.2",
"project_urls": {
"repository": "https://github.com/hdembinski/zenflow"
},
"split_keywords": [],
"urls": [
{
"comment_text": "",
"digests": {
"blake2b_256": "357c1cd30813976677d069e83c99303698030e5a644903bff669fe13c6bf1f9f",
"md5": "d4019ec48adadb92d2bc26e70820e342",
"sha256": "d2347cda830d80c439d66c023cbe7494744174fe821480e7d7389f01a7c210f2"
},
"downloads": -1,
"filename": "zenflow-0.2.2-py3-none-any.whl",
"has_sig": false,
"md5_digest": "d4019ec48adadb92d2bc26e70820e342",
"packagetype": "bdist_wheel",
"python_version": "py3",
"requires_python": ">=3.9",
"size": 14786,
"upload_time": "2025-01-22T16:29:10",
"upload_time_iso_8601": "2025-01-22T16:29:10.490899Z",
"url": "https://files.pythonhosted.org/packages/35/7c/1cd30813976677d069e83c99303698030e5a644903bff669fe13c6bf1f9f/zenflow-0.2.2-py3-none-any.whl",
"yanked": false,
"yanked_reason": null
},
{
"comment_text": "",
"digests": {
"blake2b_256": "98261d8dd47159635c9e469f6347818098c5ba2144af34707da7017fb802c14c",
"md5": "ed3980518557534d8eea651cc379aecb",
"sha256": "b5954149b2060c0a1bf61658b2d49529a762c9e432800108a56d5dc61f43d38f"
},
"downloads": -1,
"filename": "zenflow-0.2.2.tar.gz",
"has_sig": false,
"md5_digest": "ed3980518557534d8eea651cc379aecb",
"packagetype": "sdist",
"python_version": "source",
"requires_python": ">=3.9",
"size": 3415723,
"upload_time": "2025-01-22T16:29:12",
"upload_time_iso_8601": "2025-01-22T16:29:12.943975Z",
"url": "https://files.pythonhosted.org/packages/98/26/1d8dd47159635c9e469f6347818098c5ba2144af34707da7017fb802c14c/zenflow-0.2.2.tar.gz",
"yanked": false,
"yanked_reason": null
}
],
"upload_time": "2025-01-22 16:29:12",
"github": true,
"gitlab": false,
"bitbucket": false,
"codeberg": false,
"github_user": "hdembinski",
"github_project": "zenflow",
"travis_ci": false,
"coveralls": false,
"github_actions": true,
"lcname": "zenflow"
}