Adaptor from LGBM dictionary to tree
Definition at line 47 of file convertLGBMToRootTree.py.
◆ __init__()
def util.convertLGBMToRootTree.LGBMTextNode.__init__ |
( |
|
self, |
|
|
|
structure, |
|
|
|
invert_as_tmva = False |
|
) |
| |
◆ _get_left()
def util.convertLGBMToRootTree.LGBMTextNode._get_left |
( |
|
self | ) |
|
|
private |
Definition at line 68 of file convertLGBMToRootTree.py.
69 if "left_child" not in self:
71 if self[
"decision_type"] ==
"<=":
72 return LGBMTextNode(self[
"left_child"])
74 return LGBMTextNode(self[
"right_child"])
◆ _get_right()
def util.convertLGBMToRootTree.LGBMTextNode._get_right |
( |
|
self | ) |
|
|
private |
Definition at line 76 of file convertLGBMToRootTree.py.
77 if "right_child" not in self:
79 if self[
"decision_type"] ==
"<=":
80 return LGBMTextNode(self[
"right_child"])
82 return LGBMTextNode(self[
"left_child"])
◆ get_default_left()
def util.convertLGBMToRootTree.LGBMTextNode.get_default_left |
( |
|
self | ) |
|
◆ get_left()
def util.convertLGBMToRootTree.LGBMTextNode.get_left |
( |
|
self | ) |
|
Definition at line 84 of file convertLGBMToRootTree.py.
85 if not self.invert_as_tmva:
86 return self._get_left()
88 return self._get_right()
◆ get_right()
def util.convertLGBMToRootTree.LGBMTextNode.get_right |
( |
|
self | ) |
|
Definition at line 90 of file convertLGBMToRootTree.py.
91 if not self.invert_as_tmva:
92 return self._get_right()
94 return self._get_left()
◆ get_split_feature()
def util.convertLGBMToRootTree.LGBMTextNode.get_split_feature |
( |
|
self | ) |
|
Definition at line 56 of file convertLGBMToRootTree.py.
56 def get_split_feature(self):
57 if "split_feature" in self:
58 return self[
"split_feature"]
◆ get_value()
def util.convertLGBMToRootTree.LGBMTextNode.get_value |
( |
|
self | ) |
|
Definition at line 62 of file convertLGBMToRootTree.py.
63 if "threshold" in self:
64 return self[
"threshold"]
66 return self[
"leaf_value"]
◆ invert_as_tmva
util.convertLGBMToRootTree.LGBMTextNode.invert_as_tmva |
The documentation for this class was generated from the following file: