On Thu, Nov 21, 2013 at 01:23:43PM -0600, John M. Gamble wrote: > Could this be considered a Statistics module? In which case a name might > something like Statistics::GroupBy (the SQL clause just occurred to me > while I was thinking it over). > > Huh, and now looking at CPAN I see there is an Array::GroupBy module that > has a small overlap with what you are doing. So it seems close, even if > you don't think it belongs in Statistics. >
I didn't think it belonged to Statistics, but maybe it does. When I try to describe it, there's the idea of producing a "score" or a "summary" for a collection of data points (where the data is nothing more than: "we have a collection of so many 'x', 'y' and 'z'). Here's another example of what the module allows: # grey %red >= 11/36, %green >= 11/36, %blue >= 11/36: grey; # secondary blue > 0, green / blue > 33/36, green / blue < 36/33: cyan; red > 0, blue / red > 33/36, blue / red < 36/33: magenta; green > 0, red / green > 33/36, red / green < 36/33: yellow; # primary %red >= 50%: red; %blue >= 50%: blue; %green >= 50%: green; # whatever unknown; which seemed to properly match my perception when used to categorize random RGB triplets (with a little less than 30% of 'unknown', though). Mmm, maybe a better word than "score" or "summary" is "category". So what about something along the lines of Data::Categorize? (although Data:: is a prefix that usually adds no information) -- Philippe Bruhat (BooK) No matter who you may be, there is always someone who is a little worse because he thinks he is a little better. (Moral from Groo The Wanderer #3 (Epic))