How to use the nyoka.xgboost.xgboost_to_pmml.replace_name_with_derivedColumnNames function in nyoka

To help you get started, we’ve selected a few nyoka examples, based on popular ways it is used in public projects.

Secure your code as it's written. Use Snyk Code to scan source code in minutes - no build needed - and fix issues immediately.

github nyoka-pmml / nyoka / nyoka / lgbm / lgb_to_pmml.py View on Github external
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=SIMPLE_PREDICATE_OPERATOR.LESS_OR_EQUAL.value, value="{:.16f}".format(obj['threshold'])))
        create_node(obj['left_child'], nd, derived_col_names)
        return nd
github nyoka-pmml / nyoka / nyoka / lgbm / lgb_to_pmml.py View on Github external
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