Kullback-Leibler projections for Bayesian model selection in Python.
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.
Kulprit requires a working Python interpreter (3.11+).
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
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.
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
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}
}
If you want to support Kulprit financially, you can make a donation to our sister project PyMC.
Kulprit wishes to maintain a positive community. Additional details can be found in the Code of Conduct
