Reimplement methods from kotlin-statistics
Opened this issue · 2 comments
Port/re-implement methods from https://github.com/thomasnield/kotlin-statistics. Use stream-based reduction and Buffer
.
The API is here: https://github.com/mipt-npm/kmath/blob/dev/kmath-stat/src/commonMain/kotlin/space/kscience/kmath/stat/Statistic.kt
Example usage is here: https://github.com/mipt-npm/kmath/blob/dev/kmath-stat/src/jvmTest/kotlin/space/kscience/kmath/stat/StatisticTest.kt
One needs to implement a Statistic
class/object for each quantity from kotlin-statisitcs. If the reduction could be done in parallel, one should use ComposableStatistic
instead.
Use Mean
and Median
as a reference.
Just fyi, I have made a start on this issue today (porting geomean first) -- https://github.com/d-lowl/kmath/tree/port-statistics
I'll see how much I can squeeze out this weekend.
I am very happy to hear that. Please do not hesitate to write if you think that there should be some changes in the statistic API. I made it this way so we could do non-blocking streaming processing of large data. But it is not much tested yet.