pysad.utils.Window

class pysad.utils.Window(window_size)[source]

Window to limit the instances in list and keep the size fixed when full.

Parameters:

window_size (int) – The size of the window.

Methods

__init__(window_size)

get()

Method to obtain the window list.

update(num)

Adds new item to the window.

get()[source]

Method to obtain the window list.

Returns:

List containing the items in window

Return type:

window (list)

update(num)[source]

Adds new item to the window. Removes the tail if size exceeds the self.window_size.

Parameters:

num (float) – item to be added to the window.