TreeEnsembleRegressor - version 1#

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

  • Domain: ai.onnx.ml

  • Since version: 1

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

Inputs

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

Outputs

  • Y (tensor(float)): N classes

Type Constraints

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

Examples#

test_cc_treeensembleregressor_sum_single_target

Node:
  ai.onnx.ml.TreeEnsembleRegressor(x) -> (y)
  Attributes:
    nodes_treeids = [0, 0, 0, 1, 1, 1]
    nodes_nodeids = [0, 1, 2, 0, 1, 2]
    nodes_featureids = [0, 0, 0, 0, 0, 0]
    nodes_values = [2.0, 0.0, 0.0, 1.0, 0.0, 0.0]
    nodes_modes = ['BRANCH_LEQ', 'LEAF', 'LEAF', 'BRANCH_LEQ', 'LEAF', 'LEAF']
    nodes_truenodeids = [1, 0, 0, 1, 0, 0]
    nodes_falsenodeids = [2, 0, 0, 2, 0, 0]
    target_treeids = [0, 0, 1, 1]
    target_nodeids = [1, 2, 1, 2]
    target_ids = [0, 0, 0, 0]
    target_weights = [1.0, 3.0, 2.0, 4.0]
    n_targets = 1
    aggregate_function = "SUM"
    post_transform = "NONE"
Inputs:
  x: shape=(2, 1), dtype=float32
    [[0.5],
     [3. ]]

Outputs:
  y: shape=(2, 1), dtype=float32
    [[3.],
     [7.]]