#[OpenSource Project] How do I calculate a quantile if I only have frequency-based binned histogram?

45 messages · Page 1 of 1 (latest)

pearl tideBOT
errant dock
#

The image above is a very easy example to see things are going wrong (colors go up then the server crashes), but here's a more common example, where the tick times are usually way low so only q75 and q99 would really be useful

errant dock
#

bump plz help

barren copper
errant dock
#

just find out the quantiles for a given histogram

barren copper
#

Write a function that does that

#

Or use a function

errant dock
#

but i do not have the data that generated the histogram, just the frequency

barren copper
#

Write a function that identifies quantiles from frequencies

errant dock
#

... yeah that's what i'm asking help about

#

i have no clue how to do that

#

or even how to calculate by hand

barren copper
#
  1. why js
#

you can use openly available software

errant dock
#

Because this is a web page

#

and due to ambiguous licensing, i cannot even use many plotting libs

#

that's why i built that chart from scratch using d3.js

#

i just need someone to tell me how to calculate that

#

and i'll code it

barren copper
#

use a library

errant dock
#

do you know a library that would give me what i'm looking for?

barren copper
#

from frequencies? not really, especially since I haven't seen any data

#

but all typical quantile functions get you a quantile from an array

errant dock
#

I do not have an array of numbers to be quantizes, i have already a histogram of frequencies

#

that's why i'm asking

#

let me find a dataset, one second

errant dock
barren copper
#

so it's already sorted?

tawny anvilBOT
#

The following error occured while calculating:
Error: Unexpected end of expression (char 9)

barren copper
#

,calc cumsum([0.6303839732888147,0.1353923205342237,0.14006677796327213,0.09365609348914858,0.000333889816360601,0.0001669449081803005,0,0,0,0,0,0,0,0,0])

tawny anvilBOT
#

Result:

[0.63038397328881, 0.76577629382304, 0.90584307178631, 0.99949916527546, 0.99983305509182, 1, 1, 1, 1, 1, 1, 1, 1, 1, 1]
errant dock
#

the sum will be 1

#

because that's 100%

barren copper
#

If it's already sorted you can do cumulative sum and check for the values

errant dock
#

i have no idea what you mean and how that solves the issue of finding the quantiles

barren copper
#

Figure it out

#

There are many online resources you can be reading

errant dock
#

Bro, honestly if you have no idea what you are doing why do you even posting here?

#

i'm posting here because I have no idea how to calculate that

barren copper
#

No one here is going to solve your problem for you, if you haven't noticed

errant dock
#

and then you go "just use a library" without even telling me what to look for in a lib

#

if you just don't know how to solve, it's fine...

#

just don't bother wasting your time pretending you do