Skip to main content

Kullback-Leibler projections for Bayesian model selection in Python.

PyPi version Build Status codecov Code style: black

Overview

Kulprit (Pronounced: kuːl.prɪt) is a package for variable selection for Bambi models. If you find any bugs or have any feature requests, please open an issue.

Installation

Kulprit requires a working Python interpreter (3.12+).

Assuming a standard Python environment is installed on your machine (including pip), Kulprit itself can be installed in one line using:

pip install kulprit

By default, Kulprit performs a forward search. If you want to use Lasso (L1 search), you need to install scikit-learn package. You can install it using pip:

pip install kulprit[lasso]

Kulprit can also be installed using conda:

conda install -c conda-forge kulprit

Alternatively, if you want the bleeding-edge version of the package, you can install it from GitHub:

pip install git+https://github.com/bambinos/kulprit.git

Documentation

The Kulprit documentation can be found in the official docs. The examples provide a quick overview of variable selection and how this problem is tackled by Kulprit. For a more detailed discussion of the theory, but also practical advice, we recommend the paper Advances in Projection Predictive Inference.

Contributions

Kulprit is a community project and welcomes contributions. Additional information can be found in the CONTRIBUTING.md page.

For a list of contributors, see the GitHub contributor page

Citation

If you use Kulprit and want to cite it, please use

@article{mclatchie2024,
    author = {Yann McLatchie and S{\"o}lvi R{\"o}gnvaldsson and Frank Weber and Aki Vehtari},
    title = {{Advances in Projection Predictive Inference}},
    volume = {40},
    journal = {Statistical Science},
    number = {1},
    publisher = {Institute of Mathematical Statistics},
    pages = {128 -- 147},
    keywords = {Bayesian model selection, cross-validation, projection predictive inference},
    year = {2025},
    doi = {10.1214/24-STS949},
    URL = {https://doi.org/10.1214/24-STS949}
}

Donations

If you want to support Kulprit financially, you can make a donation to our sister project PyMC.

Code of Conduct

Kulprit wishes to maintain a positive community. Additional details can be found in the Code of Conduct

License

MIT License

Metadata

Release files for kulprit 0.6.1

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for kulprit 0.6.1
File Size Uploaded
kulprit-0.6.1.tar.gz 18.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for kulprit 0.6.1
File Interpreter ABI Platform
kulprit-0.6.1-py2.py3-none-any.whl Python 3, Python 2 none any Details

Total release size: 38.6 kB

Release files / kulprit-0.6.1.tar.gz

Download URL kulprit-0.6.1.tar.gz
Size 18.4 kB
Tags Source
SHA-256 checksum
How to use checksums
404fc75c1920933f5db3e15b8e070246e201d2d54cc9e2324872d747a50ccc65
BLAKE2b-256 checksum
How to use checksums
e371281d46373eb334e862490b33d1f47c34dafd5846b8bac128fd259c1da8de
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release files / kulprit-0.6.1-py2.py3-none-any.whl

Download URL kulprit-0.6.1-py2.py3-none-any.whl
Size 20.2 kB
Tags Python 2 Python 3
SHA-256 checksum
How to use checksums
e09132771b4c05fa307c52a942bd9a884f5dd81165d61c3d7276b7e072d031bc
BLAKE2b-256 checksum
How to use checksums
6166a7d86434fc95163d856d254b716acd776e938ff7bdc2e8f789d0f1b49850
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.1.0 CPython/3.13.12

Release history Release notifications | RSS feed

This release

0.6.1 This release

2 release files

0.6.0

2 release files

0.5.1

2 release files

0.5.0

2 release files

0.4.0

2 release files

0.3.0

2 release files

0.2.0

2 release files

0.1.0

2 release files

0.0.1

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page