OnlineLogBinning's Accumulator
structs
Accumulator
type hierarchy
We implement this with three nested Accumulator
struct
s: 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 LevelAccumulator
s. 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 var
iance 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 var
iance 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.