ATLAS Offline Software
|
Node for TMVA implementation. More...
#include <NodeImpl.h>
Public Member Functions | |
NodeTMVA (const int ivar, const float val, const index_t right) | |
The constructor gets the index of the variable to cut on (-1 if leaf), the index of the right child (value not used if a leaf), and the value to cut on (if not leaf) or the respons (if leaf). More... | |
void | Print (index_t index) const |
For debugging only: print the node values. More... | |
index_t | GetNext (const float value, index_t index) const |
Based on the value of the variable that's passed in, return the index of the appropriate child. More... | |
bool | IsLeaf () const |
is the current node a leaf node More... | |
var_t | GetVar () const |
The variable index to cut on (or -1 if leaf, but use IsLeaf instead if checking for leaf) More... | |
float | GetVal () const |
The value to cut on (if not leaf), or the response (if leaf). More... | |
index_t | GetLeft (index_t index) const |
For debugging: returns the index of the left node; is passed the current node index. More... | |
index_t | GetRight (index_t index) const |
For debugging: returns the index of the right node; is passed the current node index. More... | |
Private Attributes | |
float | m_cut |
cut value for internal nodes or response for leaf nodes More... | |
int16_t | m_right |
right relative index (to be added to current) (left is always current + 1) More... | |
var_t | m_var |
index of the variable to cut for internal nodes, -1 for leaf nodes More... | |
Node for TMVA implementation.
This follows the implementation in TMVA. next = value >= cut ? left : right
Definition at line 35 of file NodeImpl.h.
For debugging: returns the index of the left node; is passed the current node index.
Definition at line 64 of file NodeImpl.h.
Based on the value of the variable that's passed in, return the index of the appropriate child.
Assumes the node is not a leaf (i.e., there is no check). Must also pass the current node index.
Definition at line 78 of file NodeImpl.h.
For debugging: returns the index of the right node; is passed the current node index.
Definition at line 68 of file NodeImpl.h.
|
inline |
The value to cut on (if not leaf), or the response (if leaf).
Definition at line 60 of file NodeImpl.h.
|
inline |
The variable index to cut on (or -1 if leaf, but use IsLeaf instead if checking for leaf)
Definition at line 57 of file NodeImpl.h.
|
inline |
is the current node a leaf node
Definition at line 54 of file NodeImpl.h.
void NodeTMVA::Print | ( | index_t | index | ) | const |
|
private |
cut value for internal nodes or response for leaf nodes
Definition at line 72 of file NodeImpl.h.
|
private |
right relative index (to be added to current) (left is always current + 1)
Definition at line 73 of file NodeImpl.h.
|
private |
index of the variable to cut for internal nodes, -1 for leaf nodes
Definition at line 74 of file NodeImpl.h.