Generate statistics using combiner function.
This object mirrors a beam.CombineFn except for the add_input interface, which is expected to be defined by its sub-classes.
__init__( name, schema=None )
Initializes a statistics generator.
name: A unique name associated with the statistics generator.
schema: An optional schema for the dataset.
add_input( accumulator, input_table )
Returns result of folding a batch of inputs into accumulator.
accumulator: The current accumulator.
input_table: An Arrow Table whose columns are features and rows are examples. The columns are of type List
or Null (If a feature's value is None across all the examples in the batch, its corresponding column is of Null type).
The accumulator after updating the statistics for the batch of inputs.
Returns a fresh, empty accumulator.
An empty accumulator.
Returns result of converting accumulator into the output value.
accumulator: The final accumulator value.
A proto representing the result of this stats generator.
Merges several accumulators to a single accumulator value.
accumulators: The accumulators to merge.
The merged accumulator.