template struct NodeR

#include "decision_tree_L2.hpp"

Overview

DecisionTree Node data struct in kernel, for both train and predict.

As shown below in the struct, this data structure includes two elements, nodeInfo and threshold nodeInfo matches width of uram, includes 4 detailed members: 1.isLeaf (nodeInfo.range(0,0)) judges if current node is a leaf for leaf node: 2.leafCat (nodeInfo.range(15,1)) determines the final category id for Non-leaf node 3.featureId (nodeInfo.range(31,16)) determines the next featureId should be used to make decision 4.chl (nodeInfo.range(71,32)) : left child id in a Decision Tree node list

regValue is corresponding to the value of a leaf node threshold is corresponding to value of featureId in a sample If value of featureId in a sample < threshold, go to left child , otherwise go to right child(chl+1)

template <typename MType>
struct NodeR

// fields

ap_uint <72> nodeInfo
MType regValue
MType threshold