BoostedTreesSparseAggregateStats

public final class BoostedTreesSparseAggregateStats

Aggregates the summary of accumulated stats for the batch.

The summary stats contains gradients and hessians accumulated for each node, bucket and dimension id.

Constants

String OP_NAME The name of this op, as known by TensorFlow core engine

Public Methods

static BoostedTreesSparseAggregateStats
create(Scope scope, Operand<TInt32> nodeIds, Operand<TFloat32> gradients, Operand<TFloat32> hessians, Operand<TInt32> featureIndices, Operand<TInt32> featureValues, Operand<TInt32> featureShape, Long maxSplits, Long numBuckets)
Factory method to create a class wrapping a new BoostedTreesSparseAggregateStats operation.
Output<TInt32>
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<TInt32>
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<TFloat32>
statsSummaryValues()
output Rank 1 Tensor (shape=[number of non zero statistics])

Inherited Methods

Constants

public static final String OP_NAME

The name of this op, as known by TensorFlow core engine

Constant Value: "BoostedTreesSparseAggregateStats"

Public Methods

public static BoostedTreesSparseAggregateStats create (Scope scope, Operand<TInt32> nodeIds, Operand<TFloat32> gradients, Operand<TFloat32> hessians, Operand<TInt32> featureIndices, Operand<TInt32> featureValues, Operand<TInt32> 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<TInt32> 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<TInt32> 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<TFloat32> statsSummaryValues ()

output Rank 1 Tensor (shape=[number of non zero statistics])