lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, Feb 6, 2020 at 12:57 AM Srinivas Murthy wrote:
> Is there a high-performance lib I can use for computing running mean, standard deviations ?

I have this https://github.com/pocomane/luasnip/blob/master/src/measure.lua

Well, it is pure lua (<100 loc) so probably it is not
'high-performance' enough. However it works on running datas and it
keeps the sample count, min, max [1], mean, standard deviation, (a
definition of) Skewness and Kurtosis. I do not implemented a generic
formula so for the other distribution momentum you have to make some
change (there is a reference to a general formula in the source, if
you want to give it a try).

It also let you to keep two different indices of the same
distribution, and then merge them in one without losing information.

---

[1] I just noticed that the documentation do not cites count/min/.max.
I will fix it soon.