utils.tracker.welford#

Classes

WelfordTracker()

A Tracker that applies Welford's Algorithm to estimate the mean and variance of a sequence.

class utils.tracker.welford.WelfordTracker[source]#

Bases: Tracker

A Tracker that applies Welford’s Algorithm to estimate the mean and variance of a sequence.

Notes

Taken and adapted from Ian Covert’s SAGE implementation.

update(value_i)[source]#

Adds one value to the Tracker.

Parameters:

value_i (int or float) – The numeric value to be added to the tracker.

property mean#

Returns the mean of the stream.

property std#

Returns the standard deviation of the stream.

property var#

Returns the variance of the stream.