Convert volatile trained machine-learning algorithms to preservable formats. Concretely:
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. 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.
Project details
Release history Release notifications | RSS feed
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file petrifyml-2.1.0.tar.gz.
File metadata
- Download URL: petrifyml-2.1.0.tar.gz
- Upload date:
- Size: 69.4 kB
- Tags: Source
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ca6a15efdd550deb2ab39c615007736988bf29d9f12fb00027c4ae435245669a
|
|
| MD5 |
80aa3bf4e61bf5229d742b4c8272dbd7
|
|
| BLAKE2b-256 |
8897eb8b987079f47b2e95fe56c8b1372a6a4abd4910ba778bf935ec6cb387bb
|
File details
Details for the file petrifyml-2.1.0-py3-none-any.whl.
File metadata
- Download URL: petrifyml-2.1.0-py3-none-any.whl
- Upload date:
- Size: 68.4 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? No
- Uploaded via: twine/6.2.0 CPython/3.12.2
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
623abcb1718863d76360820fa19452defbe68b2fbbfc4f96f86f3bab17e1765b
|
|
| MD5 |
8b903b5b4b0fc0710dfc2352066369fb
|
|
| BLAKE2b-256 |
9ba0f68c3b423b79564ef66f9c72bca439f56c384aad4d0ab8e3886940d6ba5b
|