pyBumpHunter
This is a python version of the BumpHunter algorithm, see arXiv:1101.0390, G. Choudalakis, designed to find localized excess (or deficit) of events in a 1D or 2D distribution.
The main BumpHunter function will scan a data distribution using variable-width window sizes and calculate the p-value of data with respect to a given background distribution in each window. The minimum p-value obtained from all windows is the local p-value. To cope with the "look-elsewhere effect" a global p-value is calculated by performing background-only pseudo-experiments.
The BumpHunter algorithm can also perform signal injection tests where more and more signal is injected in toy data until a given signal significance (global) is reached (signal injection not available in 2D yet).
Content
- pyBumpHunter : The pyBumpHunter package
- example : Folder containing a set of example scripts and notebooks
- example/results : Folder containing the outputs of example scripts
- test : Folder containing the testing scripts (based on pytest)
- data/data.root : Toy data used in the examples and tests
- data/gen_data.C : Code used to generate the toy data with ROOT
Dependencies
Requires Python >= 3.10.
BumpHunter depends on the following python libraries :
- numpy
- scipy
- matplotlib
pyBumpHunter wiki
Examples
The examples provided in example.py and test.ipynb require the uproot package in order to read the data from a ROOT software file.
The data provided in the example consists of three histograms: a steeply falling 'background' distribution in a [0,20] x-axis range, a 'signal' gaussian shape centered on a value of 5.5, and a 'data' distribution sampled from background and signal distributions, with a signal fraction of 0.15%. The data file is produced by running gen_data.C in ROOT.
In order to run the example script, simply type python3 example.py in a terminal.
You can also open the example notebook with jupyter or binder.
- Bump hunting:
- Tomography scan:
- Test statistics and global p-value:
See the wiki for a detailed overview of all the features offered by pyBumpHunter.
To do list
- Run BH on 2D histograms
Authors and contributors
Louis Vaslin (main developper), Julien Donini
Thanks to Samuel Calvet for his help in cross-checking and validating pyBumpHunter against the (internal) C++ version of BumpHunter developped by the ATLAS collaboration.
Metadata
Release files for pyBumpHunter 0.5.2
For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.
Source distribution (sdist)
| File | Size | Uploaded | Provenance | Actions |
|---|---|---|---|---|
| pybumphunter-0.5.2.tar.gz | 2.2 MB | Without provenance | Details for pybumphunter-0.5.2.tar.gz |
Built distribution (wheel)
| File | Interpreter | ABI | Platform | Actions Reset |
|---|---|---|---|---|
| pybumphunter-0.5.2-py3-none-any.whl | Python 3 | none | any | Details for pybumphunter-0.5.2-py3-none-any.whl |
Total release size: 4.4 MB
Release files / pybumphunter-0.5.2.tar.gz
| Download URL | pybumphunter-0.5.2.tar.gz |
|---|---|
| Size | 2.2 MB |
| Tags | Source |
|
SHA-256 checksum How to use checksums |
413e5a5f7501b08eb72c28680708f5325640af30a157150fcc2cb6e6d888a8f8
|
|
BLAKE2b-256 checksum How to use checksums |
b5a7ad7c9f7c81a6962d56d47171aa58432040ebd06de7e13fc1ad320568ef79
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Release files / pybumphunter-0.5.2-py3-none-any.whl
| Download URL | pybumphunter-0.5.2-py3-none-any.whl |
|---|---|
| Size | 2.2 MB |
| Tags | Python 3 |
|
SHA-256 checksum How to use checksums |
8cb61f6e5a34e47f20f92ab1992294b80aa3949561c9d98d270dc4a189c2ea35
|
|
BLAKE2b-256 checksum How to use checksums |
382ee4a31fa466114ce638163d39362ff98ecede98eca9e204cd5664befd6cfa
|
| Upload date | |
|
Uploaded using Trusted Publishing? What is trusted publishing? |
No |
| Uploaded via |
twine/7.0.0 CPython/3.13.13
|
Security for pyBumpHunter 0.5.2
Provenance
Provenance describes where a file came from. On PyPI, provenance is shared via attestations, which provide a verifiable record of the build or publishing details. View details, limitations and caveats.
No provenance found
None of the files in this release were uploaded with provenance metadata.
A note on package security
PyPI is a repository for distributing packages, not a service for auditing them. While third-party security researchers and our staff do their best to detect and remove malicious packages, PyPI cannot guarantee the quality, security or suitability of any given package.
To learn more about protecting yourself from malicious actors, visit our package security documentation.