I'm plotting database performance values with the excellent (excellent!) Chart::Strip module.

A problem I have is that I have a group of values, e.g. wait events of different types, sharing a chart. But the typical value for e.g. "Take Lock" is normally an order of magnitude lower than e.g. "Output to network". So I put these two values in two different charts so the scales of the charts are meaningful.

But, let's say that sometimes something happens, and the values for "Take Lock" goes wild. It should now be put in the other chart with "Output to network", because these values are more similar.

I'd like to have two charts, and dynamically chose on which chart to plot the values. Large values go to the "High" chart, and small values go to the "Low" chart. So I need to somehow cluster the values into two groups that are fairly cohesive, so that all the values that end up on one chart get a scale that is relevant.

But, being mathematically challenged, I have no idea whatsoever how to do this :) What's this kind of thing called (to Google for it)? What kind of strategies can I use to try things out? Some kind of statistics thingy?

(My thoughts so far, which may be enough to solve the problem, is to just separate the values over/under the mean. But that may just be naive.)

/J


In reply to [OT] Grouping/clustering of values by jplindstrom

Title:
Use:  <p> text here (a paragraph) </p>
and:  <code> code here </code>
to format your post, it's "PerlMonks-approved HTML":



  • Posts are HTML formatted. Put <p> </p> tags around your paragraphs. Put <code> </code> tags around your code and data!
  • Titles consisting of a single word are discouraged, and in most cases are disallowed outright.
  • Read Where should I post X? if you're not absolutely sure you're posting in the right place.
  • Please read these before you post! —
  • Posts may use any of the Perl Monks Approved HTML tags:
    a, abbr, b, big, blockquote, br, caption, center, col, colgroup, dd, del, details, div, dl, dt, em, font, h1, h2, h3, h4, h5, h6, hr, i, ins, li, ol, p, pre, readmore, small, span, spoiler, strike, strong, sub, summary, sup, table, tbody, td, tfoot, th, thead, tr, tt, u, ul, wbr
  • You may need to use entities for some characters, as follows. (Exception: Within code tags, you can put the characters literally.)
            For:     Use:
    & &amp;
    < &lt;
    > &gt;
    [ &#91;
    ] &#93;
  • Link using PerlMonks shortcuts! What shortcuts can I use for linking?
  • See Writeup Formatting Tips and other pages linked from there for more info.