tft.apply_buckets( x, bucket_boundaries, name=None )
Returns a bucketized column, with a bucket index assigned to each input.
x: A numeric input
SparseTensorwhose values should be mapped to buckets. For
SparseTensors, the non-missing values will be mapped to buckets and missing value left missing.
bucket_boundaries: The bucket boundaries represented as a rank 2
name: (Optional) A name for this operation.
Tensor of the same shape as
x, with each element in the
returned tensor representing the bucketized value. Bucketized value is
in the range [0, len(bucket_boundaries)].