Aggregates the summary of accumulated stats for the batch.
The summary stats contains gradients and hessians accumulated for each node, bucket and dimension id.
Public Methods
static BoostedTreesSparseAggregateStats |
create
(
Scope
scope,
Operand
<Integer> nodeIds,
Operand
<Float> gradients,
Operand
<Float> hessians,
Operand
<Integer> featureIndices,
Operand
<Integer> featureValues,
Operand
<Integer> featureShape, Long maxSplits, Long numBuckets)
Factory method to create a class wrapping a new BoostedTreesSparseAggregateStats operation.
|
Output <Integer> |
statsSummaryIndices
()
int32; Rank 2 indices of summary sparse Tensors (shape=[number of non zero statistics, 4])
The second axis can only be 4 including node id, feature dimension, bucket id, and statistics_dimension.
|
Output <Integer> |
statsSummaryShape
()
output Rank 1 Tensor (shape=[4])
The tensor has following 4 values: [max_splits, feature_dimension, num_buckets, statistics_dimension],
where statistics_dimension = gradient_dimension + hessian_dimension.
|
Output <Float> |
statsSummaryValues
()
output Rank 1 Tensor (shape=[number of non zero statistics])
|
Inherited Methods
Public Methods
public static BoostedTreesSparseAggregateStats create ( Scope scope, Operand <Integer> nodeIds, Operand <Float> gradients, Operand <Float> hessians, Operand <Integer> featureIndices, Operand <Integer> featureValues, Operand <Integer> featureShape, Long maxSplits, Long numBuckets)
Factory method to create a class wrapping a new BoostedTreesSparseAggregateStats operation.
Parameters
scope | current scope |
---|---|
nodeIds | int32; Rank 1 Tensor containing node ids for each example, shape [batch_size]. |
gradients | float32; Rank 2 Tensor (shape=[batch_size, logits_dimension]) with gradients for each example. |
hessians | float32; Rank 2 Tensor (shape=[batch_size, hessian_dimension]) with hessians for each example. |
featureIndices | int32; Rank 2 indices of feature sparse Tensors (shape=[number of sparse entries, 2]). Number of sparse entries across all instances from the batch. The first value is the index of the instance, the second is dimension of the feature. The second axis can only have 2 values, i.e., the input dense version of Tensor can only be matrix. |
featureValues | int32; Rank 1 values of feature sparse Tensors (shape=[number of sparse entries]). Number of sparse entries across all instances from the batch. The first value is the index of the instance, the second is dimension of the feature. |
featureShape | int32; Rank 1 dense shape of feature sparse Tensors (shape=[2]). The first axis can only have 2 values, [batch_size, feature_dimension]. |
maxSplits | int; the maximum number of splits possible in the whole tree. |
numBuckets | int; equals to the maximum possible value of bucketized feature + 1. |
Returns
- a new instance of BoostedTreesSparseAggregateStats
public Output <Integer> statsSummaryIndices ()
int32; Rank 2 indices of summary sparse Tensors (shape=[number of non zero statistics, 4]) The second axis can only be 4 including node id, feature dimension, bucket id, and statistics_dimension. statistics_dimension = logits_dimension + hessian_dimension.
public Output <Integer> statsSummaryShape ()
output Rank 1 Tensor (shape=[4]) The tensor has following 4 values: [max_splits, feature_dimension, num_buckets, statistics_dimension], where statistics_dimension = gradient_dimension + hessian_dimension. gradient_dimension is the same as label_dimension, i.e., the output space. hessian_dimension can be the same as logits dimension when diagonal hessian is used, or label_dimension^2 when full hessian is used.
public Output <Float> statsSummaryValues ()
output Rank 1 Tensor (shape=[number of non zero statistics])