http://www.perlmonks.org?node_id=541163


in reply to Re: Making sense of data: Clustering OR A coding challenge
in thread Making sense of data: Clustering OR A coding challenge

Interesting, although it seems this method seems to favor outliers. With my sample dataset below it creates more bins with few or no items on the high end of the spectrum whereas nearly everything else continues to be lumped into the first category.
[0 -296 ] 86 [297 -580 ] 8 [581 -864 ] 4 [865 -1148 ] 1 [1149 -1432 ] 2 [1433 -1716 ] 0 [1717 -2000 ] 1
vs. kvale's
[12 -24 ] 33 [42 -76 ] 27 [80 -128 ] 14 [150 -250 ] 9 [280 -460 ] 9 [550 -950 ] 7 [1226 -2000 ] 3
12, 14, 16, 18, 18, 20, 20, 20, 20, 20, 20, 20, 22, 24, 24, 24, 24, 30, 30, 30, 32, 35, 35, 35, 35, 35, 35, 35, 36, 40, 42, 46, 48, 48, 50, 50, 50, 50, 54, 54, 55, 56, 56, 58, 58, 60, 60, 60, 60, 63, 64, 67, 67, 68, 70, 70, 76, 80, 86, 86, 86, 90, 90, 99, 100, 100, 100, 100, 104, 105, 128, 150, 150, 154, 169, 190, 200, 200, 200, 250, 280, 291, 291, 300, 325, 325, 330, 450, 460, 550, 566, 600, 700, 750, 770, 950, 1226, 1250, 2000, 15, 22, 24

--
In Bob We Trust, All Others Bring Data.

Replies are listed 'Best First'.
Re^3: Making sense of data: Clustering OR A coding challenge
by codeacrobat (Chaplain) on Apr 05, 2006 at 06:21 UTC
    Then you might be interested in the
    $stat->frequency_distribution(\@bins);
    notation and add more bins at lower values.
      Except that the point was to find the natural bins inherent in the data :-P

      --
      In Bob We Trust, All Others Bring Data.