hep_ml
July 1, 2025 ยท View on GitHub
hep_ml provides specific machine learning tools for purposes of high energy physics.

Notes
Jul 2025: ๐ hep_ml v0.8.0: code and examples modernized (courtesy of Jonas Eschle), now hep_ml works with python 3.9-3.13.
Main features
- uniform classifiers - the classifiers with low correlation of predictions and mass (or some other variable, or even set of variables)
- uBoost optimized implementation inside
- UGradientBoosting (with different losses, specially FlatnessLoss is of high interest)
- measures of uniformity (see hep_ml.metrics)
- advanced losses for classification, regression and ranking for UGradientBoosting (see hep_ml.losses).
- hep_ml.reweight - reweighting multidimensional distributions
(multi here means 2, 3, 5 and more dimensions - see GBReweighter!) - hep_ml.splot - minimalistic sPlot-ting
- hep_ml.speedup - building models for fast classification (Bonsai BDT)
- sklearn-compatibility of estimators.
Installation
Plain and simple:
pip install hep_ml
If you're new to python and never used pip, first install scikit-learn with these instructions.
Links
- documentation
- notebooks, code examples
- you may need to install
ROOTanduprootto run those
- you may need to install
- repository
- issue tracker
Related projects
Libraries you'll require to make your life easier and HEPpier.
- IPython Notebook โ web-shell for python
- scikit-learn โ general-purpose library for machine learning in python
- numpy โ 'MATLAB in python', vector operation in python. Use it you need to perform any number crunching.
- theano โ optimized vector analytical math engine in python
- ROOT โ main data format in high energy physics
- root_numpy โ python library to deal with ROOT files (without pain)
License
Apache 2.0, hep_ml is an open-source library.
Platforms
Linux, Mac OS X and Windows are supported.
hep_ml supports all current python versions (python >= 3.9).
Old versions (hep_ml<=0.7) supported python 2.