TreeEnsemble#
Domain:
ai.onnx.mlSince version: 5
Tree Ensemble operator. Returns the regressed values for each input in a batch.
Inputs have dimensions [N, F] where N is the input batch size and F is the number of input features.
Outputs have dimensions [N, num_targets] where N is the batch size and num_targets is the number of targets, which is a configurable attribute.
The encoding of this attribute is split along interior nodes and the leaves of the trees. Notably, attributes with the prefix nodes_* are associated with interior nodes, and attributes with the prefix leaf_* are associated with leaves.
The attributes nodes_* must all have the same length and encode a sequence of tuples, as defined by taking all the nodes_* fields at a given position.
All fields prefixed with leaf_* represent tree leaves, and similarly define tuples of leaves and must have identical length.
This operator can be used to implement both the previous TreeEnsembleRegressor and TreeEnsembleClassifier nodes.
The TreeEnsembleRegressor node maps directly to this node and requires changing how the nodes are represented.
The TreeEnsembleClassifier node can be implemented by adding a ArgMax node after this node to determine the top class.
To encode class labels, a LabelEncoder or GatherND operator may be used.
Inputs
X (T): Input of shape [Batch Size, Number of Features]
Outputs
Y (T): Output of shape [Batch Size, Number of targets]
Type Constraints
T: The input type must be a tensor of a numeric type. Allowed types: tensor(double), tensor(float), tensor(float16).