num::basic_running_stats¶
Defined in header <stats/stats.hpp>
template <typename Float = double, std::integral Index = num::idx>
struct basic_running_stats;
Welford updates for mean and variance.
Members¶
| member | description |
|---|---|
Float mean = Float{0} |
|
Float M2 = Float{0} |
|
Index count = 0 |
|
void update(Float x) |
Incorporate one observation without storing the sample history. |
Float variance() const |
Return the unbiased sample variance, or zero with fewer than two samples. |
Float std_dev() const |
Return the sample standard deviation. |
Float stderr_mean() const |
Return the uncorrelated standard error of the mean. |
void reset() |
Discard all accumulated observations. |