1 #ifndef GRAIL_LEAF_DECISION_NODE_H
2 #define GRAIL_LEAF_DECISION_NODE_H
4 #include "DecisionNode.h"
15 template <
class TDecisionType>
21 const TDecisionType* Predict(std::vector<float>&)
const final
23 return decision.get();
26 void Print(std::unordered_map<int, std::string>&,
const std::string& indent =
"")
const override
28 std::cout << indent <<
"Decision: " << *decision.get() << std::endl;
31 DecisionNodeType GetNodeType()
const final
33 return DecisionNodeType::LEAF;
37 std::unique_ptr<const TDecisionType> decision;
42 template<
class TDecisionType>
44 decision { std::move(decision)}
Class for internal usage. Decision tree node that correspond to actual decisions. They are always lea...
Definition: LeafDecisionNode.h:17
Class for internal usage. Decision tree node base type.
Definition: DecisionNode.h:21
A base class for an object that is passed to Serialize() and Deserialize() methods of DecisionTree....
Definition: IDecisionTreeSerializer.hh:21