OnlineLogBinning's Accumulator structs

Accumulator type hierarchy

BinningAccumulatorDiagram

We implement this with three nested Accumulator structs: the outermost BinningAccumulator, the middle-level LevelAccumulator, and the innermost PairAccumulator. The BinningAccumulator stores a Vector of LevelAccumulator, each of which store their own PairAccumulator.

The BinningAccumulator

This is the main interface to the binning statistics of a given data stream. The user should basically only mess with this type of object. The binning analysis is performed using it and all important statistical quantities can be found from it.

A BinningAccumulator is a wrapper around a Vector of LevelAccumulators. For a given data stream of size $N$, there are ${\rm floor}[\log_2(N)]$ binning levels. The BinningAccumulator has a length which is one more than the total number of binning levels, where the bottom-most level, level = 0, represents the unbinned data.

The LevelAccumulator

This data structure keeps track of the online mean and variance for a given level. These accumulated values are only updated though after a pair from the data stream has been read in through the LevelAccumulator's PairAccumulator.

The PairAccumulator

This is the outward-facing data structure to a given data stream. Once a pair from the data stream has been read, then the mean and variance accumulators are updated for a given level, and then the mean is propagated to the next binning level, where the process is repeated. This implements the logarithmic binning analysis.