19 #ifndef NET_INSTAWEB_REWRITER_PUBLIC_DECISION_TREE_H_
20 #define NET_INSTAWEB_REWRITER_PUBLIC_DECISION_TREE_H_
25 namespace net_instaweb {
45 double feature_threshold;
49 bool IsLeafNode()
const {
return (left == NULL && right == NULL); }
57 int num_features()
const {
return num_features_; }
65 double Predict(std::vector<double>
const& sample)
const;
68 void SanityCheck()
const;
69 void SanityCheckTraversal(
const Node* cur,
int* num_nodes)
const;
71 const Node* Root()
const;
Definition: decision_tree.h:43
double Predict(std::vector< double > const &sample) const
Definition: decision_tree.h:41
DecisionTree(const Node *nodes, int num_nodes)