Branchless representation of a decision tree using topological ordering.
T | Value type for the computation (usually floating point type) |
Definition at line 62 of file BranchlessTree.hxx.
Public Member Functions | |
void | FillSparse () |
Fill nodes of a sparse tree forming a full tree. | |
std::string | GetInferenceCode (const std::string &funcName, const std::string &typeName) |
Get code for compiling the inference function of the branchless tree with the current thresholds and cut variables. | |
T | Inference (const T *input, const int stride) |
Perform inference on a single input vector. | |
Public Attributes | |
std::vector< int > | fInputs |
Cut variables / inputs. | |
std::vector< T > | fThresholds |
Cut thresholds or scores if corresponding node is a leaf. | |
int | fTreeDepth |
Depth of the tree. | |
#include <TMVA/TreeInference/BranchlessTree.hxx>
|
inline |
Fill nodes of a sparse tree forming a full tree.
Sparse parts of the tree are marked with -1 values in the feature vector. The algorithm fills these parts up with the last threshold value so that the result of the inference stays the same but the computation always traverses the full tree, which is needed to avoid branching logic.
Definition at line 93 of file BranchlessTree.hxx.
|
inline |
Get code for compiling the inference function of the branchless tree with the current thresholds and cut variables.
[in] | funcName | Name of the function |
[in] | typeName | Name of the type used for the computation |
Definition at line 110 of file BranchlessTree.hxx.
|
inline |
Perform inference on a single input vector.
[in] | input | Pointer to data containing the input values |
[in] | stride | Stride to go from one input variable to the next one |
Definition at line 77 of file BranchlessTree.hxx.
std::vector<int> TMVA::Experimental::BranchlessTree< T >::fInputs |
Cut variables / inputs.
Definition at line 65 of file BranchlessTree.hxx.
std::vector<T> TMVA::Experimental::BranchlessTree< T >::fThresholds |
Cut thresholds or scores if corresponding node is a leaf.
Definition at line 64 of file BranchlessTree.hxx.
int TMVA::Experimental::BranchlessTree< T >::fTreeDepth |
Depth of the tree.
Definition at line 63 of file BranchlessTree.hxx.