Struct BatchStatistics

Struct Documentation

struct BatchStatistics

Implementation of Simple statistics class + batch updates using Welford’s algorithm.

Public Functions

BatchStatistics()

Empty constructor: sets everything to 0.

BatchStatistics(const std::vector<double> &batch_samples)

Constructor computing the statistics from sampled data.

Parameters:

batch_samples – The samples to use for computing the stats

BatchStatistics(const BatchStatistics &other_stats)

Copy constructor.

Parameters:

other_stats – Stats to copy

void updateStats(const BatchStatistics &other_stats)

Integrate statistics from another batch in the current one.

Parameters:

other_stats – statistics we want to merge

Public Members

double mean
double variance
size_t dim