48 template <
class LabelDataType,
class NodeType,
class DataSet,
class ExampleIndex>
57 getNumOfBranches()
const = 0;
68 computeAndSetNodeStats(DataSet& data_set,
69 std::vector<ExampleIndex>& examples,
70 std::vector<LabelDataType>& label_data,
71 NodeType& node)
const = 0;
78 getLabelOfNode(NodeType& node)
const = 0;
91 computeInformationGain(DataSet& data_set,
92 std::vector<ExampleIndex>& examples,
93 std::vector<LabelDataType>& label_data,
94 std::vector<float>& results,
95 std::vector<unsigned char>& flags,
96 const float threshold)
const = 0;
107 computeBranchIndices(std::vector<float>& results,
108 std::vector<unsigned char>& flags,
109 const float threshold,
110 std::vector<unsigned char>& branch_indices)
const = 0;
121 computeBranchIndex(
const float result,
122 const unsigned char flag,
123 const float threshold,
124 unsigned char& branch_index)
const = 0;
133 generateCodeForBranchIndexComputation(NodeType& node, std::ostream& stream)
const = 0;
142 generateCodeForOutput(NodeType& node, std::ostream& stream)
const = 0;