Ejemplo n.º 1
0
 def create_right_node(obj,derived_col_names):
     nd = pml.Node()
     nd.set_SimplePredicate(
         pml.SimplePredicate(field=xgboostToPmml.replace_name_with_derivedColumnNames(derived_col_names[int(obj['split_feature'])],\
              derived_col_names), operator='greaterOrEqual', value="{:.16f}".format(obj['threshold'])))
     create_node(obj['right_child'], nd, derived_col_names)
     return nd
Ejemplo n.º 2
0
 def create_right_node(obj, derived_col_names):
     nd = pml.Node()
     nd.set_SimplePredicate(
         pml.SimplePredicate(field=xgboostToPmml.replace_name_with_derivedColumnNames(derived_col_names[int(obj['split_feature'])],\
              derived_col_names), operator=SIMPLE_PREDICATE_OPERATOR.GREATER_THAN.value, value="{:.16f}".format(obj['threshold'])))
     create_node(obj['right_child'], nd, derived_col_names)
     return nd
Ejemplo n.º 3
0
 def create_left_node(obj, derived_col_names):
     nd = pml.Node()
     nd.set_SimplePredicate(
         pml.SimplePredicate(
             field=xgboostToPmml.replace_name_with_derivedColumnNames(
                 derived_col_names[int(obj['split_feature'])],
                 derived_col_names),
             operator='lessThan',
             value=obj['threshold']))
     create_node(obj['left_child'], nd, derived_col_names)
     return nd