Skip to content

RollingMin

Running min over a window.

Parameters

  • window_size

    Typeint

    Size of the rolling window.

Attributes

  • name

  • window_size

Examples

from river import stats

X = [1, -4, 3, -2, 2, 1]
rolling_min = stats.RollingMin(2)
for x in X:
    print(rolling_min.update(x).get())
1
-4
-4
-2
-2
1

Methods

get

Return the current value of the statistic.

update

Update and return the called instance.

Parameters

  • x'numbers.Number'