You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@druid.apache.org by GitBox <gi...@apache.org> on 2019/01/17 23:32:18 UTC

[GitHub] AlexanderSaydakov edited a comment on issue #6853: horrible histogram post-aggregation

AlexanderSaydakov edited a comment on issue #6853: horrible histogram post-aggregation 
URL: https://github.com/apache/incubator-druid/issues/6853#issuecomment-455356689
 
 
   It is hard to follow your example. Let's see if I understand it correctly.
   You take the following 11 values:
   0.0
   99.0
   100.0
   600.0
   2000.0
   5.0
   20.0
   2.0
   1772.0
   1700.0
   300.0
   You expect 0.5, 0.75, 0.9 and 0.95 quantiles to be 100, 1150, 1772 and 1886 respectively.
   Why? Some values you expect were not in the input. Do you expect some sort of interpolation? Our quantiles sketch does not do anything like that. It does not even assume they are numbers. The only requirement for the algorithm is the "less than" relation between the values. To calculate, say, 0.75 quantile exactly one needs to sort the above array and see what value has the normalized rank of 0.75, that is 75% of all values should be less than that value. The value 1700.0 has 8 values below it, so its rank is 8/11 or about 0.73. So our sketch returns 1700 as the best approximation to 0.75 quantile.
   

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
users@infra.apache.org


With regards,
Apache Git Services

---------------------------------------------------------------------
To unsubscribe, e-mail: commits-unsubscribe@druid.apache.org
For additional commands, e-mail: commits-help@druid.apache.org