1
$\begingroup$

I am new to data mining and I am exploring ways to divide a range of data into bins. It would be much easier to search for the algorithms if I knew the scientific term for this job (ranking maybe?). Here is what I desire:

I have a data within a defined range, i.e. [min, max]. I know the first order statistics of the data like mean, variance, median, etc. I also plotted a histogram of it.

My situation is somehow similar to assigning letter grades to students after an exam by examining the distribution of the overall exam grades. I want to have grades for the data from 1 to 5, with the first bin containing the smallest data values and 5 containing the highest values.

I could do it uniformly by dividing my data range into 5 equal pieces but that won't be satisfactory. I would like to do this by inspecting my data distribution. I will appreciate if you could suggest me some known algorithms to do that.

$\endgroup$
2
  • $\begingroup$ What criterion are you using? In other words, what are your bins supposed to do? What would a "good" choice of bins give you? Do you want roughly equal numbers of observations in each? If so, use the 20, 40, 60 , 80th quantiles. Or is it something else? $\endgroup$
    – Placidia
    Commented Oct 16, 2012 at 11:27
  • $\begingroup$ My bins will be used to represent certain ranges in my data. Assuming my data is grades in a classroom, 1st bin will contain the lowest grades and 5th bin the highest. I would like to decide on the bin capacity by looking at the distribution of data. However, I don't know what to look at. $\endgroup$
    – Erol
    Commented Oct 16, 2012 at 14:50

1 Answer 1

1
$\begingroup$

You are asking for the "optimal" numbers to divide your defined range in bins. Usually the bin-width is kept the same for all bins. Hence one has to find the "optimal" binwidth (or the number of bins). This is done through minimization of the function

    risk^2 = bias+variance

See "All of Statistics: A Concise Course in Statistical Inference", Page 361, Example 21.2 and Page 368, Theorem 21.7 "Cross-Validation Function"

$\endgroup$
1
  • $\begingroup$ No, I am not asking for the optimal number. I have already decided on the number: 5. I want the algorithms to use to be able to divide my data into 5 bins according to their distributions. $\endgroup$
    – Erol
    Commented Oct 16, 2012 at 14:44

Your Answer

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

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