MovingAverage

class suave_requirements.fulfillment.MovingAverage(window_size)

Mean over the last window_size samples, None if empty.

__init__(window_size)

Create an empty window of window_size samples.

add(sample)

Add a sample, dropping the oldest one when the window is full.

Methods

__init__(window_size)

Create an empty window of window_size samples.

add(sample)

Add a sample, dropping the oldest one when the window is full.

Attributes

value

Return the current windowed mean, or None without samples.