aspcore.filter.MovingAverage

class aspcore.filter.MovingAverage(forget_factor, dim, dtype=numpy.float64)

Bases: object

__init__(forget_factor, dim, dtype=numpy.float64)

Methods

__init__(forget_factor, dim[, dtype])

reset()

update(new_data_point[, count_as_updates])

count_as_updates can be used if the datapoint is already average outside of this class.

update(new_data_point, count_as_updates=1)

count_as_updates can be used if the datapoint is already average outside of this class. So if new_data_point is the average of N data points, count_as_updates should be set to N.