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. 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

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.6.0.tar.gz (18.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.6.0-py2.py3-none-any.whl (20.1 kB view details)

Uploaded Python 2Python 3

File details

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

File metadata

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

File hashes

Hashes for kulprit-0.6.0.tar.gz
Algorithm Hash digest
SHA256 57e2600c97875cee6ec9a27e9066295744e910cdb795fe7aa0629daf2dbd9f88
MD5 fb250861002155367ded3cb68abd2179
BLAKE2b-256 cdd6b3ebee13f104d631c8618c78505969c3ad6d789654881351a133eef8956d

See more details on using hashes here.

File details

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

File metadata

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

File hashes

Hashes for kulprit-0.6.0-py2.py3-none-any.whl
Algorithm Hash digest
SHA256 642fc6e1529b7d2f97b3f012322338c77eaa317ebe045a1ab5f05688c802042c
MD5 067429fff93489f9b2a0391eac41fc44
BLAKE2b-256 94e630cc250d24baf2f7175d23cae05d7fa91559525e0af712dbbd7b3b364cea

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