ai.onnx.ml - TreeEnsembleRegressor#

TreeEnsembleRegressor - 3 (ai.onnx.ml)#

Version

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

Summary

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 <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.

Mode enum is BRANCH_LEQ, BRANCH_LT, BRANCH_GTE, BRANCH_GT, BRANCH_EQ, BRANCH_NEQ, LEAF

Attributes

  • aggregate_function: Defines how to aggregate leaf values within a target. <br>One of ‘AVERAGE,’ ‘SUM,’ ‘MIN,’ ‘MAX.’ Default value is 'SUM'.

  • 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)

  • 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)

  • n_targets: The total number of targets.

  • nodes_falsenodeids: Child node if expression is false

  • nodes_featureids: Feature id for each node.

  • nodes_hitrates: Popularity of each node, used for performance and may be omitted.

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

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

  • nodes_modes: The node kind, that is, the comparison to make at the node. There is no comparison to make at a leaf node.<br>One of ‘BRANCH_LEQ’, ‘BRANCH_LT’, ‘BRANCH_GTE’, ‘BRANCH_GT’, ‘BRANCH_EQ’, ‘BRANCH_NEQ’, ‘LEAF’

  • nodes_nodeids: Node id for each node. Node ids must restart at zero for each tree and increase sequentially.

  • nodes_treeids: Tree id for each node.

  • nodes_truenodeids: Child node if expression is true

  • nodes_values: Thresholds to do the splitting on for each node.

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

  • post_transform: Indicates the transform to apply to the score. <br>One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT’ Default value is 'NONE'.

  • target_ids: The index of the target that each weight is for

  • target_nodeids: The node id of each weight

  • target_treeids: The id of the tree that each node is in.

  • target_weights: The weight for each target

  • target_weights_as_tensor: The weight for each target

Inputs

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

Outputs

  • Y (heterogeneous) - tensor(float): N classes

Type Constraints

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

Examples

Differences

00Tree Ensemble regressor. Returns the regressed values for each input in N.Tree Ensemble regressor. Returns the regressed values for each input in N.
11
22All args with nodes_ are fields of a tuple of tree nodes, andAll args with nodes_ are fields of a tuple of tree nodes, and
33it is assumed they are the same length, and an index i will decode theit is assumed they are the same length, and an index i will decode the
44tuple across these inputs. Each node id can appear only oncetuple across these inputs. Each node id can appear only once
55for each tree id.for each tree id.
66
77All fields prefixed with target_ are tuples of votes at the leaves.All fields prefixed with target_ are tuples of votes at the leaves.
88
99A leaf may have multiple votes, where each vote is weighted byA leaf may have multiple votes, where each vote is weighted by
1010the associated target_weights index.the associated target_weights index.
1111
12All fields ending with _as_tensor can be used instead of the
13same parameter without the suffix if the element type is double and not float.
1214All trees must have their node ids start at 0 and increment by 1.All trees must have their node ids start at 0 and increment by 1.
1315
1416Mode enum is BRANCH_LEQ, BRANCH_LT, BRANCH_GTE, BRANCH_GT, BRANCH_EQ, BRANCH_NEQ, LEAFMode enum is BRANCH_LEQ, BRANCH_LT, BRANCH_GTE, BRANCH_GT, BRANCH_EQ, BRANCH_NEQ, LEAF
1517
1618**Attributes****Attributes**
1719
1820* **aggregate_function**:* **aggregate_function**:
1921 Defines how to aggregate leaf values within a target.
One of
Defines how to aggregate leaf values within a target.
One of
2022 'AVERAGE,' 'SUM,' 'MIN,' 'MAX.' Default value is 'SUM'. 'AVERAGE,' 'SUM,' 'MIN,' 'MAX.' Default value is 'SUM'.
2123* **base_values**:* **base_values**:
2224 Base values for classification, added to final class score; the size Base values for classification, added to final class score; the size
2325 must be the same as the classes or can be left unassigned (assumed must be the same as the classes or can be left unassigned (assumed
2426 0) 0)
27* **base_values_as_tensor**:
28 Base values for classification, added to final class score; the size
29 must be the same as the classes or can be left unassigned (assumed
30 0)
2531* **n_targets**:* **n_targets**:
2632 The total number of targets. The total number of targets.
2733* **nodes_falsenodeids**:* **nodes_falsenodeids**:
2834 Child node if expression is false Child node if expression is false
2935* **nodes_featureids**:* **nodes_featureids**:
3036 Feature id for each node. Feature id for each node.
3137* **nodes_hitrates**:* **nodes_hitrates**:
3238 Popularity of each node, used for performance and may be omitted. Popularity of each node, used for performance and may be omitted.
39* **nodes_hitrates_as_tensor**:
40 Popularity of each node, used for performance and may be omitted.
3341* **nodes_missing_value_tracks_true**:* **nodes_missing_value_tracks_true**:
3442 For each node, define what to do in the presence of a NaN: use the For each node, define what to do in the presence of a NaN: use the
3543 'true' (if the attribute value is 1) or 'false' (if the attribute 'true' (if the attribute value is 1) or 'false' (if the attribute
3644 value is 0) branch based on the value in this array.
This
value is 0) branch based on the value in this array.
This
3745 attribute may be left undefined and the defalt value is false (0) attribute may be left undefined and the defalt value is false (0)
3846 for all nodes. for all nodes.
3947* **nodes_modes**:* **nodes_modes**:
4048 The node kind, that is, the comparison to make at the node. There is The node kind, that is, the comparison to make at the node. There is
4149 no comparison to make at a leaf node.
One of 'BRANCH_LEQ',
no comparison to make at a leaf node.
One of 'BRANCH_LEQ',
4250 'BRANCH_LT', 'BRANCH_GTE', 'BRANCH_GT', 'BRANCH_EQ', 'BRANCH_NEQ', 'BRANCH_LT', 'BRANCH_GTE', 'BRANCH_GT', 'BRANCH_EQ', 'BRANCH_NEQ',
4351 'LEAF' 'LEAF'
4452* **nodes_nodeids**:* **nodes_nodeids**:
4553 Node id for each node. Node ids must restart at zero for each tree Node id for each node. Node ids must restart at zero for each tree
4654 and increase sequentially. and increase sequentially.
4755* **nodes_treeids**:* **nodes_treeids**:
4856 Tree id for each node. Tree id for each node.
4957* **nodes_truenodeids**:* **nodes_truenodeids**:
5058 Child node if expression is true Child node if expression is true
5159* **nodes_values**:* **nodes_values**:
5260 Thresholds to do the splitting on for each node. Thresholds to do the splitting on for each node.
61* **nodes_values_as_tensor**:
62 Thresholds to do the splitting on for each node.
5363* **post_transform**:* **post_transform**:
5464 Indicates the transform to apply to the score.
One of 'NONE,'
Indicates the transform to apply to the score.
One of 'NONE,'
5565 'SOFTMAX,' 'LOGISTIC,' 'SOFTMAX_ZERO,' or 'PROBIT' Default value is 'NONE'. 'SOFTMAX,' 'LOGISTIC,' 'SOFTMAX_ZERO,' or 'PROBIT' Default value is 'NONE'.
5666* **target_ids**:* **target_ids**:
5767 The index of the target that each weight is for The index of the target that each weight is for
5868* **target_nodeids**:* **target_nodeids**:
5969 The node id of each weight The node id of each weight
6070* **target_treeids**:* **target_treeids**:
6171 The id of the tree that each node is in. The id of the tree that each node is in.
6272* **target_weights**:* **target_weights**:
6373 The weight for each target The weight for each target
74* **target_weights_as_tensor**:
75 The weight for each target
6476
6577**Inputs****Inputs**
6678
6779* **X** (heterogeneous) - **T**:* **X** (heterogeneous) - **T**:
6880 Input of shape [N,F] Input of shape [N,F]
6981
7082**Outputs****Outputs**
7183
7284* **Y** (heterogeneous) - **tensor(float)**:* **Y** (heterogeneous) - **tensor(float)**:
7385 N classes N classes
7486
7587**Type Constraints****Type Constraints**
7688
7789* **T** in (* **T** in (
7890 tensor(double), tensor(double),
7991 tensor(float), tensor(float),
8092 tensor(int32), tensor(int32),
8193 tensor(int64) tensor(int64)
8294 ): ):
8395 The input type must be a tensor of a numeric type. The input type must be a tensor of a numeric type.

TreeEnsembleRegressor - 1 (ai.onnx.ml)#

Version

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

Summary

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 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

Attributes

  • aggregate_function: Defines how to aggregate leaf values within a target. <br>One of ‘AVERAGE,’ ‘SUM,’ ‘MIN,’ ‘MAX.’ Default value is 'SUM'.

  • 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)

  • n_targets: The total number of targets.

  • nodes_falsenodeids: Child node if expression is false

  • nodes_featureids: Feature id for each node.

  • nodes_hitrates: Popularity of each node, used for performance and may be omitted.

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

  • nodes_modes: The node kind, that is, the comparison to make at the node. There is no comparison to make at a leaf node.<br>One of ‘BRANCH_LEQ’, ‘BRANCH_LT’, ‘BRANCH_GTE’, ‘BRANCH_GT’, ‘BRANCH_EQ’, ‘BRANCH_NEQ’, ‘LEAF’

  • nodes_nodeids: Node id for each node. Node ids must restart at zero for each tree and increase sequentially.

  • nodes_treeids: Tree id for each node.

  • nodes_truenodeids: Child node if expression is true

  • nodes_values: Thresholds to do the splitting on for each node.

  • post_transform: Indicates the transform to apply to the score. <br>One of ‘NONE,’ ‘SOFTMAX,’ ‘LOGISTIC,’ ‘SOFTMAX_ZERO,’ or ‘PROBIT’ Default value is 'NONE'.

  • target_ids: The index of the target that each weight is for

  • target_nodeids: The node id of each weight

  • target_treeids: The id of the tree that each node is in.

  • target_weights: The weight for each target

Inputs

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

Outputs

  • Y (heterogeneous) - tensor(float): N classes

Type Constraints

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