Kullback-Leibler projections for Bayesian model selection#
Variable selection refers to the process of identifying the most relevant variables in a model from a larger set of predictors. When performing this process we usually assume that variables contribute unevenly to the outcome and we want to identify the most important ones. Sometimes we also care about the order in which variables are included in the model.
Besides this documentation, we also recommend you to read Advances in projection predictive inference. The paper is not about Kulprit, but introduces the theory behind Kulprit and also provides some practical advice. You may also find this guide on Cross-Validation and model selection is useful. A quick guide to variable selection and related tools in the PyMC ecosystem can be found here
Kulprit is under active development so use it with care. If you find any bugs or have any feature requests, please open an issue on GitHub.
Installation#
Kulprit requires a working Python interpreter (3.10+). We recommend installing Python and key numerical libraries using the Anaconda Distribution, which has one-click installers available on all major platforms.
Assuming a standard Python environment is installed on your machine (including pip), Kulprit itself can be installed in one line using pip:
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]
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
Dependencies#
Kulprit is tested on Python 3.10+. Dependencies are listed in pyproject.toml and should all be installed by the Kulprit installer; no further action should be required.
Contributing#
We welcome contributions from interested individuals or groups! For information about contributing to Kulprit check out our instructions, policies, and guidelines here.
Contributors#
See the GitHub contributor page.
Citation#
If you find Kulprit useful in your work, please cite the following paper:
@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.