Skip to main content

Convert Scikit-learn and TMVA boosted decision trees (BDTs) to dependency-free C++ or Python

Project description

"They took all the trees, and put em in a tree museum... And they charged the people a dollar and a half to see them" — Joni Mitchell, "Big Yellow Taxi"

Boosted decision trees are widely used in HEP, particularly in data analyses for making complex, multivariate nested cuts to separate signal events from background ones.

While powerful, the complexity of their training makes BDT (and therefore analysis) preservation troublesome: BDTs get stored in different formats, which may not be forwards-compatible with future versions of their framework libraries. So now we start talking about dragging around Docker containers just to make sure the right version of the right framework is used. Plus those libraries have to be included in any user code, adding unwelcome dependencies and complexity, and perhaps even being incompatible with the target language (e.g. applying a BDT from a Python framework in a C++ application).

This is ridiculous, because BDTs are actually absurdly simple objects. The framework complexity is needed for training, but not for execution. This package provideds a set of utilities for converting sklearn and TMVA boosted decision trees, for either classification or regression, from their custom formats to vanilla C++ and Python code that has no dependencies, can be safely used forever without risk of format or framework breaking-changes, and by virtue of being static code can execute more quickly and with less memory overhead than the original form.

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

petrify-bdt-1.1.0.tar.gz (18.7 kB view details)

Uploaded Source

Built Distribution

petrify_bdt-1.1.0-py3-none-any.whl (19.7 kB view details)

Uploaded Python 3

File details

Details for the file petrify-bdt-1.1.0.tar.gz.

File metadata

  • Download URL: petrify-bdt-1.1.0.tar.gz
  • Upload date:
  • Size: 18.7 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for petrify-bdt-1.1.0.tar.gz
Algorithm Hash digest
SHA256 d42cfccf34d6aaca4fff8194e0d0123599209880bc28a456cf2d3aeef13eb986
MD5 f5a28679adb11e00417afa088ecff768
BLAKE2b-256 2200944927139fd1ba009c5c304427f5ec60bf070dc44fea4f0f7b81c554dc72

See more details on using hashes here.

File details

Details for the file petrify_bdt-1.1.0-py3-none-any.whl.

File metadata

  • Download URL: petrify_bdt-1.1.0-py3-none-any.whl
  • Upload date:
  • Size: 19.7 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/4.0.2 CPython/3.10.8

File hashes

Hashes for petrify_bdt-1.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 536503a8f55c1a4ffe83b420c0f0b1377e67fa8818dccaaf8b3f70b822b3b3fe
MD5 23d728d41b2aa8ffe4a3cac4a72d530d
BLAKE2b-256 8e59b9d1a514a174233678cb3b9d2b77c2c8837da5b03ac236acb542bb69b43c

See more details on using hashes here.

Supported by

AWS AWS Cloud computing and Security Sponsor Datadog Datadog Monitoring Fastly Fastly CDN Google Google Download Analytics Microsoft Microsoft PSF Sponsor Pingdom Pingdom Monitoring Sentry Sentry Error logging StatusPage StatusPage Status page