AdaptiveBatchMeans

abstract class AdaptiveBatchMeans(val targetBatches: Int)

Does batch means on data as new values come in by:

  • storing data into up to 2 * targetBatches batches, and report the mean of each of these

  • when 2 * targetBatches is reached, squash pairs of batches into one batch to get targetBatches batches.

Inheritors

Constructors

Link copied to clipboard
constructor(targetBatches: Int)

Properties

Link copied to clipboard

Target number of batches to maintain after collapsing.

Functions

Link copied to clipboard

Returns the current number of batches.

Link copied to clipboard

Returns the current variance of batch means.

Link copied to clipboard
fun mean(): Double

Returns the current overall mean across all batch means.

Link copied to clipboard
fun onCloseBatch(callback: () -> Unit)

Registers a callback to be invoked each time a batch is closed/finalized.