52 int const G_s =
static_cast<int>(node.
groups.size());
55 for (
int j = 0; j < n_vars && j < node.
projector.size(); ++j) {
58 if (
scale !=
nullptr && j < scale->size()) {
70 node.
lower->accept(*
this);
71 node.
upper->accept(*
this);
Eigen::Matrix< Feature, Eigen::Dynamic, 1 > FeatureVector
Dynamic-size column vector of feature values.
Definition Types.hpp:26
float Feature
Scalar type for feature values (float or double).
Definition Types.hpp:17
Definition Benchmark.hpp:22
Internal split node in a projection pursuit tree.
Definition TreeCondition.hpp:19
pp::Projector projector
Projection vector (p). Defines the linear combination of features.
Definition TreeCondition.hpp:23
TreeNode::Ptr upper
Child node for observations with projected value ≥ threshold.
Definition TreeCondition.hpp:29
TreeNode::Ptr lower
Child node for observations with projected value < threshold.
Definition TreeCondition.hpp:27
types::Feature pp_index_value
Projection pursuit index value achieved at this split.
Definition TreeCondition.hpp:34
std::set< types::Response > groups
Set of group labels reachable from this node.
Definition TreeCondition.hpp:32
Visitor interface for tree node dispatch.
Definition TreeNode.hpp:28
Leaf node in a projection pursuit tree.
Definition TreeResponse.hpp:12
types::FeatureVector const * scale
Optional per-variable σ vector (size p); scale[j] = σ_j.
Definition VIVisitor.hpp:32
void visit(TreeResponse const &) override
Visit a leaf node; no contribution to VI.
Definition VIVisitor.hpp:80
void visit(TreeCondition const &node) override
Visit a split node; accumulate contributions and recurse.
Definition VIVisitor.hpp:50
std::vector< types::Feature > vi2_contributions
VI2 contributions per variable (size p).
Definition VIVisitor.hpp:26
std::vector< types::Feature > vi3_contributions
VI3 contributions per variable (size p).
Definition VIVisitor.hpp:29
VIVisitor(int n_vars, types::FeatureVector const *scale=nullptr)
Construct a visitor for a tree with n_vars variables.
Definition VIVisitor.hpp:40