48template <
class LabelDataType,
class NodeType,
class DataSet,
class ExampleIndex>
71 NodeType& node)
const = 0;
95 std::vector<unsigned char>& flags,
96 const float threshold)
const = 0;
108 std::vector<unsigned char>& flags,
109 const float threshold,
122 const unsigned char flag,
123 const float threshold,
Iterator class for point clouds with or without given indices.
Class interface for gathering statistics for decision tree learning.
virtual std::size_t getNumOfBranches() const =0
Returns the number of brances a node can have (e.g.
virtual float computeInformationGain(DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelDataType > &label_data, std::vector< float > &results, std::vector< unsigned char > &flags, const float threshold) const =0
Computes the information gain obtained by the specified threshold on the supplied feature evaluation ...
virtual void generateCodeForOutput(NodeType &node, std::ostream &stream) const =0
Generates code for computing the output for the specified node and writes it to the specified stream.
virtual void generateCodeForBranchIndexComputation(NodeType &node, std::ostream &stream) const =0
Generates code for computing the branch indices for the specified node and writes it to the specified...
virtual void computeAndSetNodeStats(DataSet &data_set, std::vector< ExampleIndex > &examples, std::vector< LabelDataType > &label_data, NodeType &node) const =0
Computes and sets the statistics for a node.
virtual LabelDataType getLabelOfNode(NodeType &node) const =0
Returns the label of the specified node.
virtual ~StatsEstimator()
Destructor.
virtual void computeBranchIndices(std::vector< float > &results, std::vector< unsigned char > &flags, const float threshold, std::vector< unsigned char > &branch_indices) const =0
Computes the branch indices obtained by the specified threshold on the supplied feature evaluation re...
virtual void computeBranchIndex(const float result, const unsigned char flag, const float threshold, unsigned char &branch_index) const =0
Computes the branch indices obtained by the specified threshold on the supplied feature evaluation re...
Define standard C methods and C++ classes that are common to all methods.