|
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 | |
| BoundaryVisitor (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 (TreeCondition const &node) override |
| void | visit (TreeResponse const &node) override |
Public Attributes | |
| std::vector< HalfSpace > | constraints |
| Accumulated ancestor constraints. | |
| int | depth |
| std::vector< std::pair< int, types::Feature > > | fixed_vars |
| Fixed (index, value) pairs. | |
| std::vector< BoundarySegment > | segments |
| Output: clipped boundary segments. | |
| 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::BoundaryVisitor::BoundaryVisitor | ( | 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 |
Implements ppforest2::TreeNode::Visitor.
|
overridevirtual |
Implements ppforest2::TreeNode::Visitor.
| std::vector<HalfSpace> ppforest2::viz::BoundaryVisitor::constraints |
Accumulated ancestor constraints.
| int ppforest2::viz::BoundaryVisitor::depth |
| std::vector<std::pair<int, types::Feature> > ppforest2::viz::BoundaryVisitor::fixed_vars |
Fixed (index, value) pairs.
| std::vector<BoundarySegment> ppforest2::viz::BoundaryVisitor::segments |
Output: clipped boundary segments.
| int ppforest2::viz::BoundaryVisitor::var_i |
| int ppforest2::viz::BoundaryVisitor::var_j |
Indices of the two displayed feature variables.
| types::Feature ppforest2::viz::BoundaryVisitor::x_max |
| types::Feature ppforest2::viz::BoundaryVisitor::x_min |
| types::Feature ppforest2::viz::BoundaryVisitor::y_max |
Visible bounding box.
| types::Feature ppforest2::viz::BoundaryVisitor::y_min |