IQR¶
Computes the interquartile range.
Parameters¶
-
q_inf
Default →
0.25
Desired inferior quantile, must be between 0 and 1. Defaults to
0.25
. -
q_sup
Default →
0.75
Desired superior quantile, must be between 0 and 1. Defaults to
0.75
.
Attributes¶
- name
Examples¶
from river import stats
iqr = stats.IQR(q_inf=0.25, q_sup=0.75)
for i in range(0, 1001):
iqr.update(i)
if i % 100 == 0:
print(iqr.get())
0.0
50.0
100.0
150.0
200.0
250.0
300.0
350.0
400.0
450.0
500.0
Methods¶
get
Return the current value of the statistic.
update
Update the called instance.
Parameters
- x — 'numbers.Number'