Statistical aggregator
Joseph Rushton Wakeling
joseph.wakeling at webdrake.net
Thu Jun 6 07:05:42 PDT 2013
Hi all,
In case it's useful to anyone, here's a little statistical aggregator I put
together (source file attached). This is for online calculation of statistical
quantities and incidentally offers an efficient way to calculate standard
deviation in a single pass over data, using the algorithm described in this article:
http://www.cs.berkeley.edu/~mhoemmen/cs194/Tutorials/variance.pdf
One design decision I'm not sure about -- in the case that this aggregator is
given ranges of ranges as input, it will aggregate over every single element in
the ranges of ranges (... of ranges of ranges of ranges ...). This is confirmed
in the unittests. I'm not sure if this is really a feature or a design flaw --
comments welcome (and about any other aspects of the design).
Best wishes,
-- Joe
-------------- next part --------------
A non-text attachment was scrubbed...
Name: aggregator.d
Type: text/x-dsrc
Size: 2083 bytes
Desc: not available
URL: <http://lists.puremagic.com/pipermail/digitalmars-d-learn/attachments/20130606/aedc3179/attachment-0001.d>
More information about the Digitalmars-d-learn
mailing list