This release is a pre-release and may not be stable for production use.
bayes-kit
bayes-kit is an open-source Python package for black-box Bayesian
inference with minimial dependencies for maximal flexiblity.
Bayesian models involve specifying a posterior log density for parameters conditioned on data. Bayesian models are typically specified in terms of a prior distribution over parameters and a sampling distribution which generates observed data conditioned on the parameters. Users are free to define models using arbitrary Python code, such as
- direct implementation in NumPy,
- Python's foreign function interface to Fortran, C++, etc., or
- automatic differentiation libraries such as
- Stan,
- PyTorch,
- JAX, or
- TensorFlow Probability.
Bayesian inference involves conditioning on data and averaging over
uncertainty. Specifically, bayes-kit can compute
* parameter estimates,
* posterior predictions for new observations, and
* event probability forecasts,
all with Bayesian uncertainty quantification.
Black-box algorithms are agnostic to model structure. Algorithms in
bayes-kit may require only log densities, whereas the
high-performance algorithms further require gradients of the log
density function.
Markov chain Monte Carlo samplers
Markov chain Monte Carlo (MCMC) samplers provide a sequence of random draws from target log density, which may be used for Monte Carlo estimates of posterior expectations and quantiles for uncertainty quantification.
Hamiltonian Monte Carlo sampler
Hamiltonian Monte Carlo simulates Hamiltonian dynamics with a potential energy function equal to the negative log density. It requires a target log density, gradient function, and optionally a metric.
Random-walk Metropolis sampler
Random-walk Metropolis is a diffusive sampler that requires a target log density function and a symmetric pseudorandom proposal generator.
Dependencies
bayes-kit has minimal dependencies, requiring only
Licensing
- Code in this repository is released under the MIT License.
- Documentation in this repository is released under the CC BY 4.0 License.
Metadata
Release files for bayes-kit 0.0.1a0
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | |
|---|---|---|---|
| bayes_kit-0.0.1a0.tar.gz | 8.7 kB | Details |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Reset |
|---|---|---|---|---|
| bayes_kit-0.0.1a0-py3-none-any.whl | Python 3 | none | any | Details |
Total release size: 11.9 kB
Release files / bayes_kit-0.0.1a0.tar.gz
| Download URL | bayes_kit-0.0.1a0.tar.gz |
|---|---|
| Size | 8.7 kB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
414e94e052eeeafad5d4775df40a3d953e800340df49517050d85edca17ec8b6
|
|
BLAKE2b-256 checksum How to use checksums |
0d951e9302e28a9a4dff36c44fa958685988c9f3068d1f5cc0932039bc415e3f
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|
Release files / bayes_kit-0.0.1a0-py3-none-any.whl
| Download URL | bayes_kit-0.0.1a0-py3-none-any.whl |
|---|---|
| Size | 3.2 kB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
098ddc517cb52dd64cc423f2834e0e01a91d7be7f64822ee8add97ea09ccac5e
|
|
BLAKE2b-256 checksum How to use checksums |
b3be36aaa2931dc6b076bc0a78850c28a6154cec0ed9e46fa180f5069c551e05
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/4.0.2 CPython/3.9.13
|