Hi Tomas,
I don't know any packages, but a running mean is trivial to
implement. See eg
http://en.wikipedia.org/wiki/Algorithms_for_calculating_variance#Online_algorithm
, it doesn't get faster than this, and it is reasonably accurate.
Medians (and quantiles in general) are trickier, because you have to
keep track of the whole distribution or sacrifice accuracy. See
@inproceedings{greenwald2001space,
title={Space-efficient online computation of quantile summaries},
author={Greenwald, Michael and Khanna, Sanjeev},
booktitle={ACM SIGMOD Record},
volume={30},
number={2},
pages={58--66},
year={2001},
organization={ACM}
}
You might want to tell us more about your problem and then you could get
more specific advice. Eg if number of observations >> number of distinct
values, you could simply count them in a Dict.
Best,
Tamas
On Tue, Jan 06 2015, Tomas Mikoviny <[email protected]> wrote:
> Hi,
> I was just wondering if anyone knows if there is a package that implements
> *fast* running median/mean algorithms?
>
> Thanks a lot...
>