0
$\begingroup$

I have been looking into the site http://www.saedsayad.com/unsupervised_binning.htm and there it shows range values to the right under equal frequency binning ....

I have so much looked to find how the ranges are formed but has been in vain. So , can somebody explain how those ranges are formed for the given dataset or explain the freq binning procedure in a good manner.

Great thanx for any help on this!

$\endgroup$

1 Answer 1

0
$\begingroup$

As far as I can see the choice of the bin size /frequency is arbitrary in those examples. Frequency binning is simple choosing you bin boundaries in a way that the bin content size is the same. For the frequency approach it looks like the order the elements by size and calculate the bin edges in the middle between the highest element of bin A and the lowest of bin B.

If you want to be really fancy you can use methods like bayesian blocks that actually choose bin size dynamically with respect of information content.

$\endgroup$
4
  • $\begingroup$ thank u for the fast response. would you expand on " For the frequency approach it looks like the order the elements by size and calculate the bin edges in the middle between the highest element of bin A and the lowest of bin B.\" $\endgroup$
    – Devi
    Apr 25, 2018 at 11:52
  • $\begingroup$ In your example data looks like this [0,4,12,16,16, 18, 24, 26, 28]. So if you choose frequency = 3 you end up with 3 bins: [0,4,12] [16,16, 18] [24, 26, 28] last element of bin 1 =12 first element bin 2 = 16 - bin boundary = (12+16)/2 = 14 - same logic also works for the second case. $\endgroup$
    – El Burro
    Apr 25, 2018 at 13:11
  • $\begingroup$ @ElBurro If there is 12 instead of the first 16. i.e. [0,4,12,12,16, 18, 24, 26, 28] which bin it belongs to? Is it [0,4,12] [12,16, 18] or is it [0,4,12, 12] [16, 18, 24] ? $\endgroup$ Jan 1, 2020 at 4:25
  • $\begingroup$ I would argue that all values that are the same should be in the same bin $\endgroup$
    – El Burro
    Jan 3, 2020 at 10:29

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.