https://github.com/sbi-dev/pyknos
Conditional density estimation with neural networks
https://github.com/sbi-dev/pyknos
density-estimation mixture-density-networks normalizing-flows
Last synced: 6 months ago
JSON representation
Conditional density estimation with neural networks
- Host: GitHub
- URL: https://github.com/sbi-dev/pyknos
- Owner: sbi-dev
- License: apache-2.0
- Created: 2020-02-21T14:16:33.000Z (almost 6 years ago)
- Default Branch: main
- Last Pushed: 2025-01-18T09:42:24.000Z (about 1 year ago)
- Last Synced: 2025-07-12T03:56:44.429Z (7 months ago)
- Topics: density-estimation, mixture-density-networks, normalizing-flows
- Language: Python
- Homepage:
- Size: 106 KB
- Stars: 31
- Watchers: 8
- Forks: 6
- Open Issues: 4
-
Metadata Files:
- Readme: README.md
- Changelog: CHANGELOG.md
- License: LICENSE.txt
- Code of conduct: CODE_OF_CONDUCT.md
Awesome Lists containing this project
README
[](https://badge.fury.io/py/pyknos)
[](https://github.com/conda-forge/pyknos-feedstock)
[](https://github.com/sbi-dev/pyknos/blob/master/CONTRIBUTING.md)
[](https://github.com/mackelab/sbi/blob/master/LICENSE.txt)
## Description
Python package for conditional density estimation. It either wraps or
implements diverse conditional density estimators.
### Density estimation with normalizing flows
This package provides pass-through access to all the
functionalities of [nflows](https://github.com/bayesiains/nflows).
## Installation
`pyknos` requires Python 3.8 or higher. A GPU is not required, but can lead to speed-up
in some cases. We recommend using a
[`conda`](https://docs.conda.io/en/latest/miniconda.html) virtual environment
([Miniconda installation instructions](https://docs.conda.io/en/latest/miniconda.html)).
If `conda` is installed on the system, an environment for installing `pyknos` can be
created as follows:
```commandline
$ conda create -n pyknos_env python=3.12 && conda activate pyknos_env
```
### From PyPI
To install `pyknos` from PyPI run
```
python -m pip install pyknos
```
### From conda-forge
To install and add `pyknos` to a project with [`pixi`](https://pixi.sh/), from the project directory run
```
pixi add pyknos
```
and to install into a particular conda environment with [`conda`](https://docs.conda.io/projects/conda/), in the activated environment run
```
conda install --channel conda-forge pyknos
```
## Examples
See the [`sbi` repository](https://github.com/sbi-dev/sbi) for examples of using pyknos.
## Name
pyknós (πυκνός) is the transliterated Greek root for density
(pyknótita) and also means *sagacious*.
## Copyright notice
This program is free software: you can redistribute it and/or modify
it under the terms of the Apache License 2.0., see LICENSE for more details.
This program is distributed in the hope that it will be useful,
but WITHOUT ANY WARRANTY; without even the implied warranty of
MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.
## Acknowledgments
Thanks to Artur Bekasov, Conor Durkan and George Papamarkarios for
their work on [nflows](https://github.com/bayesiains/nflows).
The MDN implementation in this package is based on Conor M. Durkan's.