![]() |
ATLAS Offline Software
|
Builds binning and quantisation functions from a JSON configuration. More...
#include <QuantileFactory.h>
Public Types | |
| using | QuantileFunc = std::pair<size_t, std::function<int(const SG::AuxElement&)>> |
Static Public Member Functions | |
| static QuantileFunc | quantileFactory (const nlohmann::json &cfg) |
| Dispatch to the appropriate binning scheme based on the JSON config. | |
| static std::vector< float > | parseEdges (const nlohmann::json &cfg) |
| Parse an ordered list of bin edges from the JSON config. | |
Static Private Member Functions | |
| static QuantileFunc | makeEnumerate (const nlohmann::json &cfg) |
| Maps discrete values to category indices. | |
| static QuantileFunc | makeCategory (const nlohmann::json &cfg) |
| Converts a continuous variable into a bin index using an ordered list of bin edges. | |
| static QuantileFunc | makeNodes (const nlohmann::json &cfg) |
| Builds a tree-based lookup structure for node-based binning, primarily used for pseudo-continuous 2D tagging. | |
| static QuantileFunc | makeDense (const nlohmann::json &cfg) |
| Combines multiple binning dimensions into a single flattened global index used for scale factor lookup. | |
Builds binning and quantisation functions from a JSON configuration.
Several binning schemes are supported, each suited to a different representation of the tagger output. The quantileFactory dispatches to the appropriate scheme based on the configuration.
Definition at line 16 of file QuantileFactory.h.
| using QuantileFactory::QuantileFunc = std::pair<size_t, std::function<int(const SG::AuxElement&)>> |
Definition at line 19 of file QuantileFactory.h.
|
staticprivate |
Converts a continuous variable into a bin index using an ordered list of bin edges.
Definition at line 43 of file QuantileFactory.cxx.
|
staticprivate |
Combines multiple binning dimensions into a single flattened global index used for scale factor lookup.
Definition at line 141 of file QuantileFactory.cxx.
|
staticprivate |
Maps discrete values to category indices.
Definition at line 66 of file QuantileFactory.cxx.
|
staticprivate |
Builds a tree-based lookup structure for node-based binning, primarily used for pseudo-continuous 2D tagging.
Definition at line 94 of file QuantileFactory.cxx.
|
static |
Parse an ordered list of bin edges from the JSON config.
Edges may be finite floats or the strings "inf", "+inf", "-inf". Throws if the resulting edges are not strictly sorted in ascending order.
Definition at line 9 of file QuantileFactory.cxx.
|
static |
Dispatch to the appropriate binning scheme based on the JSON config.
Definition at line 174 of file QuantileFactory.cxx.