statistics icon indicating copy to clipboard operation
statistics copied to clipboard

Optimize Statistics.Quantile.weightedAvg/quantile

Open Shimuuar opened this issue 9 years ago • 0 comments

To calculate k-th q-quantile weightedAvg sorts approximately k/q smallest elements of an array. When k/q > 0.5 it's not optimal. We only need to sort upper 1-k/q elements in this case.

Shimuuar avatar Jul 11 '16 22:07 Shimuuar