5#ifndef MVAUtils_NodeImpl_H
6#define MVAUtils_NodeImpl_H
15 class DecisionTreeNode;
137 NodeLGBM(
const int ivar,
const float val,
const index_t right,
const int8_t default_left)
158 if (not std::isnan(value)) {
200 if (not std::isnan(value)) {
void Print(index_t index) const
float GetVal() const
The value to cut on (if not leaf), or the response (if leaf).
int16_t m_right
right relative index (to be added to current) (left is always current + 1)
index_t GetNext(const float value, index_t index) const
index_t GetRight(index_t index) const
For debugging: returns the index of the right node; is passed the current node index.
NodeLGBMSimple(const int ivar, const float val, const index_t right)
float m_cut
cut value for internal nodes or response for leaf nodes
var_t GetVar() const
The variable index to cut on (or -1 if leaf, but use IsLeaf instead if checking for leaf)
var_t m_var
index of the variable to cut for internal nodes, -1 for leaf nodes
index_t GetLeft(index_t index) const
For debugging: returns the index of the left node; is passed the current node index.
bool IsLeaf() const
is the current node a leaf node
var_t m_var
index of the variable to cut for internal nodes, -1 for leaf nodes
index_t GetRight(index_t index) const
int16_t m_right
right relative index (to be added to current) (left is always current + 1)
index_t GetNext(const float value, index_t index) const
void Print(index_t index) const
NodeLGBM(const int ivar, const float val, const index_t right, const int8_t default_left)
bool GetDefaultLeft() const
bool IsLeaf() const
is the current node a leaf node
index_t GetLeft(index_t index) const
float m_cut
cut value for internal nodes or response for leaf nodes
var_t m_var
index of the variable to cut for internal nodes, -1 for leaf nodes
float m_cut
cut value for internal nodes or response for leaf nodes
index_t GetRight(index_t index) const
For debugging: returns the index of the right node; is passed the current node index.
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 (...
void Print(index_t index) const
For debugging only: print the node values.
int16_t m_right
right relative index (to be added to current) (left is always current + 1)
var_t GetVar() const
The variable index to cut on (or -1 if leaf, but use IsLeaf instead if checking for leaf)
bool IsLeaf() const
is the current node a leaf node
index_t GetLeft(index_t index) const
For debugging: returns the index of the left node; is passed the current node index.
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.
float GetVal() const
The value to cut on (if not leaf), or the response (if leaf).
index_t GetLeft(index_t index) const
index_t GetRight(index_t index) const
bool GetDefaultLeft() const
NodeXGBoost(const int ivar, const float val, const index_t right, const int8_t default_left)
void Print(index_t index) const
bool IsLeaf() const
is the current node a leaf node
index_t GetNext(const float value, index_t index) const
int8_t var_t
The variable type (i.e., the index of the variable to cut)
int32_t index_t
The index type of the node in the vector.