Metadata-Version: 2.1
Name: selanneal
Version: 0.0.4
Summary: multidimensional selection optimisation with simulated annealing
Home-page: https://github.com/feichtip/selanneal
Author: Paul Feichtinger
Author-email: paul.feichtinger@oeaw.ac.at
License: MIT
Project-URL: Source, https://github.com/feichtip/selanneal
Project-URL: Tracker, https://github.com/feichtip/selanneal/issues
Keywords: hep physics cut selection optimisation annealing
Classifier: Programming Language :: Python :: 3
Classifier: License :: OSI Approved :: MIT License
Classifier: Operating System :: OS Independent
Requires-Python: >=3.6
Description-Content-Type: text/markdown
License-File: LICENSE
Requires-Dist: numpy>=1.18.0
Requires-Dist: numba>=0.53.0

<img alt="selannel" width="350" src="https://github.com/feichtip/selanneal/blob/main/docs/_images/selanneal.png?raw=true"/>

Optimising selections with simulated annealing
==============================================

Selanneal is a simple package for optimising multivariate selections via a figure of merit.
The optimisation is performed for all given features simultaneously by utilising the simulated annealing method.
It relies on [numba](http://numba.pydata.org/) for just-in-time compilation of the algorithm.
The procedure works on binned data, so an n-dimensional histogram needs to be provided.

Currently, two modes of operation exist:
* **edges**: cut only the edges of each feature (results in "rectangular cuts")
* **bins**: select individual bins from a grid (for now limited to 2 feature dimensions)

This package was written for applications in high energy physics but can apply to general problems in statistical data analysis.

## usage

* install with
```console
python3 -m pip install selanneal
```
* tutorial notebooks for basic usage in *examples*
* training data is to be provided as numpy arrays representing the histogrammed number of signal and background events
* hyper-parameters to tune the optimisation: Tmin, Tmax, steps
* the default figure of merit is N_sig/sqrt(N_sig + N_bkg), but any objective function can be used
* additionally, a ROC curve can be obtained by maximising the purity for fixed signal efficiencies
