MCPcopy Create free account
hub / github.com/dmlc/xgboost / is_leaf

Method is_leaf

demo/guide-python/model_parser.py:104–106  ·  view source on GitHub ↗

Whether a node is leaf.

(self, node_id: int)

Source from the content-addressed store, hash-verified

102 return self.nodes[node_id].right
103
104 def is_leaf(self, node_id: int) -> bool:
105 """Whether a node is leaf."""
106 return self.nodes[node_id].left == -1
107
108 def is_deleted(self, node_id: int) -> bool:
109 """Whether a node is deleted."""

Callers 2

__str__Method · 0.95
get_feature_weightsFunction · 0.80

Calls

no outgoing calls

Tested by

no test coverage detected