Online stats in python, based in generators with send
Project description
Generators Based Online Statistics
This package implement online statistics written using python generators, with the only depencency of numpy.
It can callculate basic stats in an online manner with good stability.
install
poetry add onstats
pip install onstats
How to use:
Import the window / rolling statistic you want to compute and send the values to it:
>>> from onstats import ma # moving average
>>> gma = ma(2) # with window 2
>>> gma.send(3)
3
>>> gma.send(5)
4
>>> gma.send(5)
5
If w = 0 the window is infinitelly large , we will compute the normal average.
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
onstats-0.9.2.tar.gz
(3.9 kB
view hashes)