29#include <unordered_map>
34namespace Experimental {
44 template <
typename Vector>
std::vector< Value_t > fCutValues
static void terminateTree(TMVA::Experimental::RBDT &ff, int &nPreviousNodes, int &nPreviousLeaves, IndexMap &nodeIndices, IndexMap &leafIndices, int &treesSkipped)
RBDT()=default
Private default constructor, used by the public LoadXGBoost() factory.
static RBDT LoadXGBoost(std::string const &jsonPath)
Construct an RBDT from an XGBoost model in its native JSON serialization.
static void correctIndices(std::span< int > indices, IndexMap const &nodeIndices, IndexMap const &leafIndices)
RBDT uses a more efficient representation of the BDT in flat arrays.
std::vector< int > fRightIndices
std::unordered_map< int, int > IndexMap
Map from XGBoost to RBDT indices.
void Softmax(const Value_t *array, Value_t *out) const
std::vector< int > fTreeNumbers
Value_t EvaluateBinary(const Value_t *array) const
std::vector< Value_t > fResponses
std::vector< Value_t > fBaseResponses
std::vector< Value_t > Compute(std::vector< Value_t > const &x) const
Compute model prediction on a single event.
Vector Compute(const Vector &x) const
Compute model prediction on a single event.
std::vector< unsigned int > fCutIndices
void ComputeImpl(const Value_t *array, Value_t *out) const
std::vector< int > fRootIndices
std::vector< int > fLeftIndices
create variable transformations