|
ppforest2 v0.1.0
Projection Pursuit Decision Trees and Random Forests
|
Visitor that collects and clips decision boundary line segments. More...
#include <Visualization.hpp>
Public Member Functions | |
| SpatialVisitor (int var_i, int var_j, std::vector< std::pair< int, types::Feature > > const &fixed_vars, types::Feature x_min, types::Feature x_max, types::Feature y_min, types::Feature y_max) | |
| void | visit (TreeBranch const &node) override |
Public Member Functions inherited from ppforest2::viz::SpatialVisitor | |
| SpatialVisitor (int var_i, int var_j, std::vector< std::pair< int, types::Feature > > const &fixed_vars, types::Feature x_min, types::Feature x_max, types::Feature y_min, types::Feature y_max) | |
| void | visit (TreeBranch const &node) override |
| Push constraint, recurse into children, pop. | |
| void | visit (TreeLeaf const &node) override |
| No-op default; override in subclasses that need leaf work. | |
Public Member Functions inherited from ppforest2::TreeNode::Visitor | |
| virtual | ~Visitor ()=default |
Public Attributes | |
| std::vector< BoundarySegment > | segments |
| Output: clipped boundary segments. | |
Public Attributes inherited from ppforest2::viz::SpatialVisitor | |
| std::vector< HalfSpace > | constraints |
| Accumulated ancestor half-space constraints. | |
| int | depth |
| std::vector< std::pair< int, types::Feature > > | fixed_vars |
| Fixed (index, value) pairs. | |
| int | var_i |
| int | var_j |
| Indices of the two displayed feature variables. | |
| types::Feature | x_max |
| types::Feature | x_min |
| types::Feature | y_max |
| Visible bounding box. | |
| types::Feature | y_min |
Visitor that collects and clips decision boundary line segments.
Traverses the tree, projecting each split's boundary into a 2D plane defined by two feature variables (var_i, var_j). All other variables are held at fixed values to reduce the split from p-D to 2D.
Each boundary line is clipped to:
Usage:
| ppforest2::viz::SpatialVisitor::SpatialVisitor | ( | int | var_i, |
| int | var_j, | ||
| std::vector< std::pair< int, types::Feature > > const & | fixed_vars, | ||
| types::Feature | x_min, | ||
| types::Feature | x_max, | ||
| types::Feature | y_min, | ||
| types::Feature | y_max ) |
|
overridevirtual |
Reimplemented from ppforest2::TreeNode::Visitor.
| std::vector<BoundarySegment> ppforest2::viz::BoundaryVisitor::segments |
Output: clipped boundary segments.