quantile accuracy issue
Opened this issue · 0 comments
pchalasani commented
The example below computes quantiles for randomly shuffled numbers in the range 0..1000. The 10% and 90% quantiles don't look good. By contrast the this Java library https://github.com/mayconbordin/streaminer gives reasonably good results (using the Frugal2U class).
(ns ...
...
(:require
[skream.core :as sk]))
(def sk
(-> (sk/create-skream)
(sk/track-quantile-ish 0.10)
(sk/track-quantile-ish 0.25)
(sk/track-quantile-ish 0.50)
(sk/track-quantile-ish 0.90)))
(let
[sk (apply (partial sk/add-num sk ) (shuffle (range 1000)))]
(map #(get-in sk [[:quantile %] :quantile] )
[0.10 0.25 0.50 0.90]))
==> (252.27943 252.27943 496.22464 750.6505)