MCPcopy Create free account
hub / github.com/DeepRec-AI/DeepRec / IsTerminalSplitNode

Method IsTerminalSplitNode

tensorflow/core/kernels/boosted_trees/resources.cc:466–473  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

464}
465
466bool BoostedTreesEnsembleResource::IsTerminalSplitNode(
467 const int32 tree_id, const int32 node_id) const {
468 const auto& node = tree_ensemble_->trees(tree_id).nodes(node_id);
469 DCHECK_EQ(node.node_case(), boosted_trees::Node::kBucketizedSplit);
470 const int32 left_id = node.bucketized_split().left_id();
471 const int32 right_id = node.bucketized_split().right_id();
472 return is_leaf(tree_id, left_id) && is_leaf(tree_id, right_id);
473}
474
475// For each pruned node, finds the leaf where it finally ended up and
476// calculates the total update from that pruned node prediction.

Callers

nothing calls this directly

Calls 3

left_idMethod · 0.80
right_idMethod · 0.80
nodesMethod · 0.45

Tested by

no test coverage detected