Skip to main content

multidimensional selection optimisation with simulated annealing

Project description

selannel

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

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

selanneal-0.0.4.tar.gz (108.9 kB view details)

Uploaded Source

Built Distribution

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

selanneal-0.0.4-py3-none-any.whl (12.6 kB view details)

Uploaded Python 3

File details

Details for the file selanneal-0.0.4.tar.gz.

File metadata

  • Download URL: selanneal-0.0.4.tar.gz
  • Upload date:
  • Size: 108.9 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for selanneal-0.0.4.tar.gz
Algorithm Hash digest
SHA256 8911195522edc0b2e90920226360a74f2aacd3647a92d5f91be3415b56cc1f29
MD5 bab3b675df072b09f8e8d05254393e84
BLAKE2b-256 95d37f9edbacf0ecc63139176468a7b4d867d14bcde2f20b15feaa39eabaec9b

See more details on using hashes here.

File details

Details for the file selanneal-0.0.4-py3-none-any.whl.

File metadata

  • Download URL: selanneal-0.0.4-py3-none-any.whl
  • Upload date:
  • Size: 12.6 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.0.1 CPython/3.10.12

File hashes

Hashes for selanneal-0.0.4-py3-none-any.whl
Algorithm Hash digest
SHA256 8775c990a4397afe522cf785e3ed897561a30b21fb083b68b72359e7781a89a7
MD5 049ee713848138b507c9fa6a65959a41
BLAKE2b-256 996ae04d94fad3fc563642384056799b1f127d09b93fb13cb62eb4905e13731d

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