module onnxrt.ops_cpu.op_tree_ensemble_classifier#

Inheritance diagram of mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier

Short summary#

module mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier

Runtime operator.

source on GitHub

Classes#

class

truncated documentation

TreeEnsembleClassifier_1

TreeEnsembleClassifier_3

TreeEnsembleClassifier (ai.onnx.ml) =================================== Tree Ensemble classifier. Returns the top class …

TreeEnsembleClassifier_3

TreeEnsembleClassifier (ai.onnx.ml) =================================== Tree Ensemble classifier. Returns the top class …

TreeEnsembleClassifierCommon

TreeEnsembleClassifierDouble

TreeEnsembleClassifierDouble (mlprodict) ======================================== Version Onnx name: TreeEnsembleClassifierDouble

TreeEnsembleClassifierDoubleSchema

Defines a schema for operators added in this package such as TreeEnsembleClassifierDouble.

Properties#

property

truncated documentation

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default

Returns the list of arguments as well as the list of parameters with the default values (close to the signature). …

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_default_modified

Returns the list of modified parameters.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_mandatory

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

args_optional

Returns the list of optional arguments.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

atts_value

Returns all parameters in a dictionary.

nb_classes

Returns the number of expected classes.

nb_classes

Returns the number of expected classes.

nb_classes

Returns the number of expected classes.

nb_classes

Returns the number of expected classes.

nb_classes

Returns the number of expected classes.

Methods#

method

truncated documentation

__init__

__init__

__init__

__init__

__init__

__init__

_find_custom_operator_schema

Finds a custom operator defined by this runtime.

_find_custom_operator_schema

Finds a custom operator defined by this runtime.

_find_custom_operator_schema

Finds a custom operator defined by this runtime.

_find_custom_operator_schema

Finds a custom operator defined by this runtime.

_find_custom_operator_schema

Finds a custom operator defined by this runtime.

_get_typed_attributes

_get_typed_attributes

_get_typed_attributes

_get_typed_attributes

_get_typed_attributes

_init

_init

_init

_init

_init

_run

This is a C++ implementation coming from onnxruntime. tree_ensemble_classifier.cc. …

_run

This is a C++ implementation coming from onnxruntime. tree_ensemble_classifier.cc. …

_run

This is a C++ implementation coming from onnxruntime. tree_ensemble_classifier.cc. …

_run

This is a C++ implementation coming from onnxruntime. tree_ensemble_classifier.cc. …

_run

This is a C++ implementation coming from onnxruntime. tree_ensemble_classifier.cc. …

Documentation#

Runtime operator.

source on GitHub

mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier.TreeEnsembleClassifier#

alias of TreeEnsembleClassifier_3

class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier.TreeEnsembleClassifierCommon(dtype, onnx_node, desc=None, expected_attributes=None, runtime_version=3, **options)#

Bases: OpRunClassifierProb, _ClassifierCommon

__init__(dtype, onnx_node, desc=None, expected_attributes=None, runtime_version=3, **options)#
_find_custom_operator_schema(op_name)#

Finds a custom operator defined by this runtime.

source on GitHub

_get_typed_attributes(k)#
_init(dtype, version)#
_run(x, attributes=None, verbose=0, fLOG=None)#

This is a C++ implementation coming from onnxruntime. tree_ensemble_classifier.cc. See class RuntimeTreeEnsembleClassifier.

source on GitHub

class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier.TreeEnsembleClassifierDouble(mlprodict)#

Bases: TreeEnsembleClassifierCommon


Version

Onnx name: TreeEnsembleClassifierDouble

This version of the operator has been available since version of domain mlprodict.

Runtime implementation: TreeEnsembleClassifierDouble

__init__(onnx_node, desc=None, **options)#
class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier.TreeEnsembleClassifierDoubleSchema#

Bases: OperatorSchema

Defines a schema for operators added in this package such as TreeEnsembleClassifierDouble.

source on GitHub

__init__()#
class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier.TreeEnsembleClassifier_1(onnx_node, desc=None, **options)#

Bases: TreeEnsembleClassifierCommon

__init__(onnx_node, desc=None, **options)#
class mlprodict.onnxrt.ops_cpu.op_tree_ensemble_classifier.TreeEnsembleClassifier_3(onnx_node, desc=None, **options)#

Bases: TreeEnsembleClassifierCommon

TreeEnsembleClassifier (ai.onnx.ml)#

Tree Ensemble classifier. Returns the top class for each of N inputs.

The attributes named ‘nodes_X’ form a sequence of tuples, associated by index into the sequences, which must all be of equal length. These tuples define the nodes.

Similarly, all fields prefixed with ‘class_’ are tuples of votes at the leaves. A leaf may have multiple votes, where each vote is weighted by the associated class_weights index.

One and only one of classlabels_strings or classlabels_int64s will be defined. The class_ids are indices into this list. All fields ending with <i>_as_tensor</i> can be used instead of the same parameter without the suffix if the element type is double and not float.

Attributes

  • base_values: Base values for classification, added to final class score; the size must be the same as the classes or can be left unassigned (assumed 0) default value cannot be automatically retrieved (FLOATS)

  • base_values_as_tensor: Base values for classification, added to final class score; the size must be the same as the classes or can be left unassigned (assumed 0) default value cannot be automatically retrieved (TENSOR)

  • class_ids: The index of the class list that each weight is for. default value cannot be automatically retrieved (INTS)

  • class_nodeids: node id that this weight is for. default value cannot be automatically retrieved (INTS)

  • class_treeids: The id of the tree that this node is in. default value cannot be automatically retrieved (INTS)

  • class_weights: The weight for the class in class_id. default value cannot be automatically retrieved (FLOATS)

  • class_weights_as_tensor: The weight for the class in class_id. default value cannot be automatically retrieved (TENSOR)

  • classlabels_int64s: Class labels if using integer labels. One and only one of the ‘classlabels_*’ attributes must be defined. default value cannot be automatically retrieved (INTS)

  • classlabels_strings: Class labels if using string labels. One and only one of the ‘classlabels_*’ attributes must be defined. default value cannot be automatically retrieved (STRINGS)

  • nodes_falsenodeids: Child node if expression is false. default value cannot be automatically retrieved (INTS)

  • nodes_featureids: Feature id for each node. default value cannot be automatically retrieved (INTS)

  • nodes_hitrates: Popularity of each node, used for performance and may be omitted. default value cannot be automatically retrieved (FLOATS)

  • nodes_hitrates_as_tensor: Popularity of each node, used for performance and may be omitted. default value cannot be automatically retrieved (TENSOR)

  • nodes_missing_value_tracks_true: For each node, define what to do in the presence of a missing value: if a value is missing (NaN), use the ‘true’ or ‘false’ branch based on the value in this array. This attribute may be left undefined, and the defalt value is false (0) for all nodes. default value cannot be automatically retrieved (INTS)

  • nodes_modes: The node kind, that is, the comparison to make at the node. There is no comparison to make at a leaf node. One of ‘BRANCH_LEQ’, ‘BRANCH_LT’, ‘BRANCH_GTE’, ‘BRANCH_GT’, ‘BRANCH_EQ’, ‘BRANCH_NEQ’, ‘LEAF’ default value cannot be automatically retrieved (STRINGS)

  • nodes_nodeids: Node id for each node. Ids may restart at zero for each tree, but it not required to. default value cannot be automatically retrieved (INTS)

  • nodes_treeids: Tree id for each node. default value cannot be automatically retrieved (INTS)

  • nodes_truenodeids: Child node if expression is true. default value cannot be automatically retrieved (INTS)

  • nodes_values: Thresholds to do the splitting on for each node. default value cannot be automatically retrieved (FLOATS)

  • nodes_values_as_tensor: Thresholds to do the splitting on for each node. default value cannot be automatically retrieved (TENSOR)

  • post_transform: Indicates the transform to apply to the score. One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT.’ Default value is nameposttransformsNONEtypeSTRING (STRING)

Inputs

  • X (heterogeneous)T1: Input of shape [N,F]

Outputs

  • Y (heterogeneous)T2: N, Top class for each point

  • Z (heterogeneous)tensor(float): The class score for each class, for each point, a tensor of shape [N,E].

Type Constraints

  • T1 tensor(float), tensor(double), tensor(int64), tensor(int32): The input type must be a tensor of a numeric type.

  • T2 tensor(string), tensor(int64): The output type will be a tensor of strings or integers, depending on which of the classlabels_* attributes is used.

Version

Onnx name: TreeEnsembleClassifier

This version of the operator has been available since version 3 of domain ai.onnx.ml.

Runtime implementation: TreeEnsembleClassifier

__init__(onnx_node, desc=None, **options)#