14 using Ptr = std::unique_ptr<TreeLeaf>;
std::unique_ptr< TreeLeaf > Ptr
Definition TreeLeaf.hpp:14
bool equals(TreeNode const &other) const override
Structural equality comparison (value-based).
types::Outcome value
Class label stored at this leaf.
Definition TreeLeaf.hpp:17
std::set< types::GroupId > node_groups() const override
Sorted set of group labels reachable from this node.
Definition TreeLeaf.hpp:34
int group_count() const override
Number of distinct groups reachable from this node.
Definition TreeLeaf.hpp:32
static Ptr make(types::Outcome value)
Factory method that returns a unique_ptr to a new TreeLeaf.
TreeLeaf(types::Outcome value)
TreeNode::Ptr clone() const override
Deep copy of this node and its subtree.
types::Outcome response() const override
The group label at this node (leaf value or majority group).
void accept(TreeNode::Visitor &visitor) const override
Accept a tree node visitor (double dispatch).
types::Outcome predict(types::FeatureVector const &x) const override
Return the stored class label (ignores input).
Visitor interface for tree node dispatch.
Definition TreeNode.hpp:31
Abstract base class for nodes in a projection pursuit tree.
Definition TreeNode.hpp:19
std::unique_ptr< TreeNode > Ptr
Definition TreeNode.hpp:21
Eigen::Matrix< Feature, Eigen::Dynamic, 1 > FeatureVector
Dynamic-size column vector of feature values.
Definition Types.hpp:36
Feature Outcome
Scalar type for predictions (float for both classification and regression).
Definition Types.hpp:30
int GroupId
Scalar type for internal group labels (integer). Used as map keys, set elements, and partition indice...
Definition Types.hpp:27
Binarization strategies for multiclass-to-binary reduction.
Definition Benchmark.hpp:25