53 int const G_s =
static_cast<int>(node.
groups.size());
56 for (
int j = 0; j < n_vars && j < node.
projector.size(); ++j) {
59 if (
scale !=
nullptr && j < scale->size()) {
71 node.
lower->accept(*
this);
72 node.
upper->accept(*
this);
Internal split node in a projection pursuit tree.
Definition TreeBranch.hpp:15
TreeNode::Ptr upper
Child node for observations with projected value ≥ cutpoint.
Definition TreeBranch.hpp:26
std::set< types::GroupId > groups
Set of group labels reachable from this node.
Definition TreeBranch.hpp:29
types::Feature pp_index_value
Projection pursuit index value achieved at this split.
Definition TreeBranch.hpp:31
pp::Projector projector
Projection vector (p). Defines the linear combination of features.
Definition TreeBranch.hpp:20
TreeNode::Ptr lower
Child node for observations with projected value < cutpoint.
Definition TreeBranch.hpp:24
Leaf node in a projection pursuit tree.
Definition TreeLeaf.hpp:12
Visitor interface for tree node dispatch.
Definition TreeNode.hpp:31
types::FeatureVector const * scale
Optional per-variable σ vector (size p); scale[j] = σ_j.
Definition VIVisitor.hpp:33
std::vector< types::Feature > vi2_contributions
VI2 contributions per variable (size p).
Definition VIVisitor.hpp:27
std::vector< types::Feature > vi3_contributions
VI3 contributions per variable (size p).
Definition VIVisitor.hpp:30
void visit(TreeLeaf const &) override
Visit a leaf node; no contribution to VI.
Definition VIVisitor.hpp:81
void visit(TreeBranch const &node) override
Visit a split node; accumulate contributions and recurse.
Definition VIVisitor.hpp:51
VIVisitor(int n_vars, types::FeatureVector const *scale=nullptr)
Construct a visitor for a tree with n_vars variables.
Definition VIVisitor.hpp:41
Eigen::Matrix< Feature, Eigen::Dynamic, 1 > FeatureVector
Dynamic-size column vector of feature values.
Definition Types.hpp:36
float Feature
Scalar type for feature values.
Definition Types.hpp:24
Binarization strategies for multiclass-to-binary reduction.
Definition Benchmark.hpp:25