module onnx_conv.operator_converters.conv_lightgbm#

Short summary#

module mlprodict.onnx_conv.operator_converters.conv_lightgbm

Modified converter from LightGbm.py.

source on GitHub

Functions#

function

truncated documentation

_create_node_id

_parse_node

Parses nodes.

_parse_tree_structure

The pool of all nodes’ indexes created when parsing a single tree. Different tree use different pools.

_select_close_float

Selects the closest float to x. It returns always numpy.float32(x).

_split_tree_ensemble_atts

Splits the attributes of a TreeEnsembleRegressor into multiple trees in order to do the summation in double instead …

_translate_split_criterion

calculate_lightgbm_output_shapes

Shape calculator for LightGBM Booster (see lightgbm).

convert_lightgbm

This converters reuses the code from LightGbm.py

Documentation#

Modified converter from LightGbm.py.

source on GitHub

mlprodict.onnx_conv.operator_converters.conv_lightgbm._create_node_id(node_id_pool)#
mlprodict.onnx_conv.operator_converters.conv_lightgbm._parse_node(tree_id, class_id, node_id, node_id_pool, node_pyid_pool, learning_rate, node, attrs)#

Parses nodes.

source on GitHub

mlprodict.onnx_conv.operator_converters.conv_lightgbm._parse_tree_structure(tree_id, class_id, learning_rate, tree_structure, attrs)#

The pool of all nodes’ indexes created when parsing a single tree. Different tree use different pools.

source on GitHub

mlprodict.onnx_conv.operator_converters.conv_lightgbm._select_close_float(x)#

Selects the closest float to x. It returns always numpy.float32(x).

source on GitHub

mlprodict.onnx_conv.operator_converters.conv_lightgbm._split_tree_ensemble_atts(attrs, split)#

Splits the attributes of a TreeEnsembleRegressor into multiple trees in order to do the summation in double instead of floats.

source on GitHub

mlprodict.onnx_conv.operator_converters.conv_lightgbm._translate_split_criterion(criterion)#
mlprodict.onnx_conv.operator_converters.conv_lightgbm.calculate_lightgbm_output_shapes(operator)#

Shape calculator for LightGBM Booster (see lightgbm).

source on GitHub

mlprodict.onnx_conv.operator_converters.conv_lightgbm.convert_lightgbm(scope, operator, container)#

This converters reuses the code from LightGbm.py and makes some modifications. It implements converters for models in lightgbm.

source on GitHub