Skip to main content

Kullback-Leibler projections for Bayesian model selection.

Project description

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. Kulprit is under active development so use it with care. If you find any bugs or have any feature requests, please open an issue.

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

Documentation

The Kulprit documentation can be found in the official docs. The examples provides a quick overview of variable selection and how this problem is tackled by Kulprit. A more detailed discussion of the theory, but also practical advice, we recommend you read 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

Project details


Download files

Download the file for your platform. If you're not sure which to choose, learn more about installing packages.

Source Distribution

kulprit-0.4.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

kulprit-0.4.0-py2.py3-none-any.whl (15.6 kB view details)

Uploaded Python 2Python 3

File details

Details for the file kulprit-0.4.0.tar.gz.

File metadata

  • Download URL: kulprit-0.4.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kulprit-0.4.0.tar.gz
Algorithm Hash digest
SHA256 d033b47b9ae16975424aaedc96794c173237b42b012d492a561cfb955a2fba63
MD5 1f20e87bdd37993eb0e42e88f3013140
BLAKE2b-256 d3a270bec47d73a4f762c293a6a25617217a6efaa69abfdef0cf0ad88cfc9e42

See more details on using hashes here.

File details

Details for the file kulprit-0.4.0-py2.py3-none-any.whl.

File metadata

  • Download URL: kulprit-0.4.0-py2.py3-none-any.whl
  • Upload date:
  • Size: 15.6 kB
  • Tags: Python 2, Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.1.0 CPython/3.12.9

File hashes

Hashes for kulprit-0.4.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 37b3c591104a8122554286bc6bd3e831500b2b2fc5b7b71cbb274889f4ecd368
MD5 2a7bf883cbcfda7c63a9e53b10dba2f6
BLAKE2b-256 a59adab0d2a243dd66b286fbfaec9ed50a3996c5484aabfb1ffb951f95e5eae0

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page