You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently, the tree class handles pruning by marking nodes as "deleted" and thus available for reallocation. This is helpful during training / sampling since the tree class largely consists of vectors and with std::vector, element removal is O(N) but element insertion is (amortized) O(1).
When a tree is done sampling (potentially ready for serialization), it would be nice to re-organize the tree class by removing deleted nodes and renumbering the nodes that remain in the tree::parent_, tree::cleft_, and tree::cright_ vectors.
The text was updated successfully, but these errors were encountered:
Currently, the tree class handles pruning by marking nodes as "deleted" and thus available for reallocation. This is helpful during training / sampling since the tree class largely consists of vectors and with
std::vector
, element removal is O(N) but element insertion is (amortized) O(1).When a tree is done sampling (potentially ready for serialization), it would be nice to re-organize the tree class by removing deleted nodes and renumbering the nodes that remain in the
tree::parent_
,tree::cleft_
, andtree::cright_
vectors.The text was updated successfully, but these errors were encountered: