Adaptor from LGBM dictionary to tree
 
Definition at line 48 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 69 of file convertLGBMToRootTree.py.
   70         if "left_child" not in self:
 
   72         if self[
"decision_type"] == 
"<=":
 
   73             return LGBMTextNode(self[
"left_child"])
 
   75             return LGBMTextNode(self[
"right_child"])
 
 
 
 
◆ _get_right()
  
  | 
        
          | def util.convertLGBMToRootTree.LGBMTextNode._get_right | ( |  | self | ) |  |  | private | 
 
Definition at line 77 of file convertLGBMToRootTree.py.
   78         if "right_child" not in self:
 
   80         if self[
"decision_type"] == 
"<=":
 
   81             return LGBMTextNode(self[
"right_child"])
 
   83             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 85 of file convertLGBMToRootTree.py.
   86         if not self.invert_as_tmva:
 
   87             return self._get_left()
 
   89             return self._get_right()
 
 
 
 
◆ get_right()
      
        
          | def util.convertLGBMToRootTree.LGBMTextNode.get_right | ( |  | self | ) |  | 
      
 
Definition at line 91 of file convertLGBMToRootTree.py.
   92         if not self.invert_as_tmva:
 
   93             return self._get_right()
 
   95             return self._get_left()
 
 
 
 
◆ get_split_feature()
      
        
          | def util.convertLGBMToRootTree.LGBMTextNode.get_split_feature | ( |  | self | ) |  | 
      
 
Definition at line 57 of file convertLGBMToRootTree.py.
   57     def get_split_feature(self):
 
   58         if "split_feature" in self:
 
   59             return self[
"split_feature"]
 
 
 
◆ get_value()
      
        
          | def util.convertLGBMToRootTree.LGBMTextNode.get_value | ( |  | self | ) |  | 
      
 
Definition at line 63 of file convertLGBMToRootTree.py.
   64         if "threshold" in self:
 
   65             return self[
"threshold"]
 
   67             return self[
"leaf_value"]
 
 
 
 
◆ invert_as_tmva
      
        
          | util.convertLGBMToRootTree.LGBMTextNode.invert_as_tmva | 
      
 
 
The documentation for this class was generated from the following file: