StochTree 0.1.1
Loading...
Searching...
No Matches
Public Member Functions | List of all members
StochTree::UnsortedNodeSampleTracker Class Reference

Mapping nodes to the indices they contain. More...

#include <partition_tracker.h>

Public Member Functions

void ReconstituteFromForest (TreeEnsemble &forest, ForestDataset &dataset)
 Reconstruct the node sample tracker based on the splits in a forest.
 
void PartitionTreeNode (Eigen::MatrixXd &covariates, int tree_id, int node_id, int left_node_id, int right_node_id, int feature_split, TreeSplit &split)
 Partition a node based on a new split rule.
 
void PartitionTreeNode (Eigen::MatrixXd &covariates, int tree_id, int node_id, int left_node_id, int right_node_id, int feature_split, double split_value)
 Partition a node based on a new split rule.
 
void PartitionTreeNode (Eigen::MatrixXd &covariates, int tree_id, int node_id, int left_node_id, int right_node_id, int feature_split, std::vector< std::uint32_t > const &category_list)
 Partition a node based on a new split rule.
 
void ResetTreeToRoot (int tree_id, data_size_t n)
 Convert a tree to root.
 
void PruneTreeNodeToLeaf (int tree_id, int node_id)
 Convert a (currently split) node to a leaf.
 
bool IsLeaf (int tree_id, int node_id)
 Whether node_id is a leaf.
 
bool IsValidNode (int tree_id, int node_id)
 Whether node_id is a valid node.
 
bool LeftNodeIsLeaf (int tree_id, int node_id)
 Whether node_id's left child is a leaf.
 
bool RightNodeIsLeaf (int tree_id, int node_id)
 Whether node_id's right child is a leaf.
 
data_size_t NodeBegin (int tree_id, int node_id)
 First index of data points contained in node_id.
 
data_size_t NodeEnd (int tree_id, int node_id)
 One past the last index of data points contained in node_id.
 
data_size_t NodeSize (int tree_id, int node_id)
 One past the last index of data points contained in node_id.
 
int Parent (int tree_id, int node_id)
 Parent node_id.
 
int LeftNode (int tree_id, int node_id)
 Left child of node_id.
 
int RightNode (int tree_id, int node_id)
 Right child of node_id.
 
std::vector< data_size_t > TreeNodeIndices (int tree_id, int node_id)
 Data indices for a given node.
 
void UpdateObservationMapping (int node_id, int tree_id, SampleNodeMapper *sample_node_mapper)
 Update SampleNodeMapper for all the observations in node_id.
 
void UpdateObservationMapping (Tree *tree, int tree_id, SampleNodeMapper *sample_node_mapper)
 Update SampleNodeMapper for all the observations in tree.
 
int NumTrees ()
 Number of trees.
 
FeatureUnsortedPartitionGetFeaturePartition (int i)
 Return a pointer to the feature partition tracking tree i.
 

Detailed Description

Mapping nodes to the indices they contain.


The documentation for this class was generated from the following file: