public final class BoostedTreesCalculateBestFeatureSplit extends PrimitiveOp
The split information is the best threshold (bucket id), gains and left/right node contributions per node for each feature.
It is possible that not all nodes can be split on each feature. Hence, the list of possible nodes can differ between the features. Therefore, we return `node_ids_list` for each feature, containing the list of nodes that this feature can be used to split.
In this manner, the output is the best split per features and per node, so that it needs to be combined later to produce the best split for each node (among all possible features).
The output shapes are compatible in a way that the first dimension of all tensors are the same and equal to the number of possible split nodes for each feature.
Modifier and Type | Class and Description |
---|---|
static class |
BoostedTreesCalculateBestFeatureSplit.Options
Optional attributes for
BoostedTreesCalculateBestFeatureSplit |
operation
Modifier and Type | Method and Description |
---|---|
static BoostedTreesCalculateBestFeatureSplit |
create(Scope scope,
Operand<Integer> nodeIdRange,
Operand<Float> statsSummary,
Operand<Float> l1,
Operand<Float> l2,
Operand<Float> treeComplexity,
Operand<Float> minNodeWeight,
Long logitsDimension,
BoostedTreesCalculateBestFeatureSplit.Options... options)
Factory method to create a class wrapping a new BoostedTreesCalculateBestFeatureSplit operation.
|
Output<Integer> |
featureDimensions()
A Rank 1 tensors indicating the best feature dimension for each feature to split for certain nodes if the feature is multi-dimension.
|
Output<Float> |
gains()
A Rank 1 tensors indicating the best gains for each feature to split for certain nodes.
|
Output<Float> |
leftNodeContribs()
A Rank 2 tensors indicating the contribution of the left nodes when branching from parent nodes (given by the tensor element in the output node_ids_list) to the left direction by the given threshold for each feature.
|
Output<Integer> |
nodeIds()
A Rank 1 tensors indicating possible split node ids for each feature.
|
Output<Float> |
rightNodeContribs()
A Rank 2 tensors, with the same shape/conditions as left_node_contribs_list, but just that the value is for the right node.
|
static BoostedTreesCalculateBestFeatureSplit.Options |
splitType(String splitType) |
Output<String> |
splitWithDefaultDirections()
A Rank 1 tensors indicating the which direction to go if data is missing.
|
Output<Integer> |
thresholds()
A Rank 1 tensors indicating the bucket id to compare with (as a threshold) for split in each node.
|
equals, hashCode, op, toString
public static BoostedTreesCalculateBestFeatureSplit create(Scope scope, Operand<Integer> nodeIdRange, Operand<Float> statsSummary, Operand<Float> l1, Operand<Float> l2, Operand<Float> treeComplexity, Operand<Float> minNodeWeight, Long logitsDimension, BoostedTreesCalculateBestFeatureSplit.Options... options)
scope
- current scopenodeIdRange
- A Rank 1 tensor (shape=[2]) to specify the range [first, last) of node ids to process within `stats_summary_list`. The nodes are iterated between the two nodes specified by the tensor, as like `for node_id in range(node_id_range[0], node_id_range[1])` (Note that the last index node_id_range[1] is exclusive).statsSummary
- A Rank 4 tensor (#shape=[max_splits, feature_dims, bucket, stats_dims]) for accumulated stats summary (gradient/hessian) per node, per dimension, per buckets for each feature.
The first dimension of the tensor is the maximum number of splits, and thus not all elements of it will be used, but only the indexes specified by node_ids will be used.l1
- l1 regularization factor on leaf weights, per instance based.l2
- l2 regularization factor on leaf weights, per instance based.treeComplexity
- adjustment to the gain, per leaf based.minNodeWeight
- mininum avg of hessians in a node before required for the node to be considered for splitting.logitsDimension
- The dimension of logit, i.e., number of classes.options
- carries optional attributes valuespublic static BoostedTreesCalculateBestFeatureSplit.Options splitType(String splitType)
splitType
- A string indicating if this Op should perform inequality split or equality split.public Output<Integer> nodeIds()
public Output<Float> gains()
public Output<Integer> featureDimensions()
public Output<Integer> thresholds()
public Output<Float> leftNodeContribs()
public Output<Float> rightNodeContribs()
public Output<String> splitWithDefaultDirections()
Copyright © 2022. All rights reserved.