Skip to main content

"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. Recently, support for lightweightNNs, TMVA multilayer perceptrons, and MVAUtils (lgbm and xgboost) has been added.

In summary, this package contains several scripts written to convert BDTs and Neural Nets from various formats common in HEP to long-lived formats (either plain-text code or ONNX files). The individual scripts are described in a detailed readme. Further information can be found in the release note -- please cite us if you found this package useful in your academic work.

PetrifyML is released under the GPL-3 license. Please note however, that this does not apply to its outputs (Python, C++, or ONNX files), to which we apply the Apache-2.0 license, except in the case that the licensing requirements of the input files require a stricter license as indicated by the user.

Metadata

Release files for petrifyml 2.1.0

For a detailed explanation of source distributions (sdists) and built distributions (wheels), please see the package formats documentation.

Source distribution (sdist)

Source distribution for petrifyml 2.1.0
File Size Uploaded
petrifyml-2.1.0.tar.gz 69.4 kB Details

Built distribution (wheel)

Table of built distributions (wheels) for petrifyml 2.1.0
File Interpreter ABI Platform
petrifyml-2.1.0-py3-none-any.whl Python 3 none any Details

Total release size: 137.8 kB

Release files / petrifyml-2.1.0.tar.gz

Download URL petrifyml-2.1.0.tar.gz
Size 69.4 kB
Tags Source
SHA-256 checksum
How to use checksums
ca6a15efdd550deb2ab39c615007736988bf29d9f12fb00027c4ae435245669a
BLAKE2b-256 checksum
How to use checksums
8897eb8b987079f47b2e95fe56c8b1372a6a4abd4910ba778bf935ec6cb387bb
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release files / petrifyml-2.1.0-py3-none-any.whl

Download URL petrifyml-2.1.0-py3-none-any.whl
Size 68.4 kB
Tags Python 3
SHA-256 checksum
How to use checksums
623abcb1718863d76360820fa19452defbe68b2fbbfc4f96f86f3bab17e1765b
BLAKE2b-256 checksum
How to use checksums
9ba0f68c3b423b79564ef66f9c72bca439f56c384aad4d0ab8e3886940d6ba5b
Upload date
Uploaded using Trusted Publishing?
What is trusted publishing?
No
Uploaded via twine/6.2.0 CPython/3.12.2

Release history Release notifications | RSS feed

This release

2.1.0 This release

2 release files

2.0.0

2 release files

Anthropic, PBC Visionary sponsor Bloomberg Visionary sponsor Hudson River Trading Visionary sponsor Meta Visionary sponsor NVIDIA Visionary sponsor Microsoft Sustainability sponsor Depot Continuous Integration AWS Cloud computing and Security Sponsor Datadog Monitoring Fastly CDN Google Download Analytics Sentry Error logging StatusPage Status page