TreeEnsembleRegressor - version 3#

This page documents version 3 of operator TreeEnsembleRegressor. See TreeEnsembleRegressor for the latest version (since version 5).

  • Domain: ai.onnx.ml

  • Since version: 3

Tree Ensemble regressor. Returns the regressed values for each input in N. All args with nodes are fields of a tuple of tree nodes, and it is assumed they are the same length, and an index i will decode the tuple across these inputs. Each node id can appear only once for each tree id. All fields prefixed with target are tuples of votes at the leaves. A leaf may have multiple votes, where each vote is weighted by the associated target_weights index. All fields ending with _as_tensor can be used instead of the same parameter without the suffix if the element type is double and not float. All trees must have their node ids start at 0 and increment by 1. Mode enum is BRANCH_LEQ, BRANCH_LT, BRANCH_GTE, BRANCH_GT, BRANCH_EQ, BRANCH_NEQ, LEAF

Inputs

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

Outputs

  • Y (tensor(float)): N classes

Attributes

  • aggregate_function (string): Defines how to aggregate leaf values within a target.

  • base_values (float[]): Base values for regression, added to final prediction after applying aggregate_function.

  • base_values_as_tensor (tensor): Base values for regression, added to final prediction.

  • n_targets (int): The total number of targets.

  • nodes_falsenodeids (int[]): Child node if expression is false.

  • nodes_featureids (int[]): Feature id for each node.

  • nodes_hitrates (float[]): Popularity of each node, used for performance and may be omitted.

  • nodes_hitrates_as_tensor (tensor): Popularity of each node, used for performance and may be omitted.

  • nodes_missing_value_tracks_true (int[]): For each node, define what to do in the presence of a NaN.

  • nodes_modes (string[]): The node kind, that is, the comparison to make at the node.

  • nodes_nodeids (int[]): Node id for each node. Node ids must restart at zero for each tree and increase sequentially.

  • nodes_treeids (int[]): Tree id for each node.

  • nodes_truenodeids (int[]): Child node if expression is true.

  • nodes_values (float[]): Thresholds to do the splitting on for each node.

  • nodes_values_as_tensor (tensor): Thresholds to do the splitting on for each node.

  • post_transform (string): Indicates the transform to apply to the score.

  • target_ids (int[]): The index of the target that each weight is for.

  • target_nodeids (int[]): The node id of each weight.

  • target_treeids (int[]): The id of the tree that each node is in.

  • target_weights (float[]): The weight for each target.

  • target_weights_as_tensor (tensor): The weight for each target.

Type Constraints

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

Differences with previous version (1)#

SchemaDiff: TreeEnsembleRegressor (domain 'ai.onnx.ml')

  • old version: 1

  • new version: 3

  • breaking: no

Attributes:

  • added ‘nodes_values_as_tensor’: type=TENSOR; required=False; default=UNDEFINED

  • added ‘nodes_hitrates_as_tensor’: type=TENSOR; required=False; default=UNDEFINED

  • added ‘target_weights_as_tensor’: type=TENSOR; required=False; default=UNDEFINED

  • added ‘base_values_as_tensor’: type=TENSOR; required=False; default=UNDEFINED

Documentation:

  • line similarity: 0.92 (+2/-0 lines)

--- TreeEnsembleRegressor v1
+++ TreeEnsembleRegressor v3
@@ -7,5 +7,7 @@
     All fields prefixed with target_ are tuples of votes at the leaves.<br>
     A leaf may have multiple votes, where each vote is weighted by
     the associated target_weights index.<br>
+    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.
     All trees must have their node ids start at 0 and increment by 1.<br>
     Mode enum is BRANCH_LEQ, BRANCH_LT, BRANCH_GTE, BRANCH_GT, BRANCH_EQ, BRANCH_NEQ, LEAF