Ideas for Grouping numeric data based on the distance from each other?

Collapse
This topic is closed.
X
X
 
  • Time
  • Show
Clear All
new posts
  • Erik Nodland

    Ideas for Grouping numeric data based on the distance from each other?

    Hi Everyone,

    Just after some ideas and suggestions on how to do this. I have a large
    amount of numeric data which I would like to group given a distance as a
    parameter.
    IE. If my dataset was simply 1, 5, 9,10,11,16,17,2 5,29 and I pass in a
    distance of 2 then I would want to end up with groups like
    1, 5, (9,10,11), (16,17) ,25,29

    So [9,10,11] is grouped because each number is within a distance of 2 from
    each other. Equally [16,17] is grouped because of the same.

    To make this more complicated each numeric would actually be a x, y plot. So
    the actual data would be more like

    [10,12], [20,21] , [21,23], [30,31] etc. Each one having 2 sets of numbers.
    In this case the grouping would be

    [10,12], ([20,21][21,23]), [30,31]. So [20,21] and [21,23] are grouped
    because x in both sets are within 2 and y in both sets are within 2.

    any body have any good ideas to start me off

    Thanks very much in advance

    SoS

  • Peter Duniho

    #2
    Re: Ideas for Grouping numeric data based on the distance from eachother?

    In article <3C1703D6-995C-477B-8F28-36641D987118@mi crosoft.com>
    "ErikNodlan d" <erik@gotaabejo king.comwrote:
    Just after some ideas and suggestions on how to do this. I have a
    large amount of numeric data which I would like to group given a
    distance as a parameter.
    IE. If my dataset was simply 1, 5, 9,10,11,16,17,2 5,29 and I pass in
    a distance of 2 then I would want to end up with groups like
    1, 5, (9,10,11), (16,17) ,25,29
    How should the algorithm group the data if you have a string of
    numbers within 2 of an adjacent number, but where the entire range of
    such adjacent numbers is greater than 2?

    For example:

    5, 7, 9, 10, 11
    [...]
    any body have any good ideas to start me off
    It seems to me that as long as you can come up with a reliable,
    unambiguous rule about how the grouping should work, it will be easy.
    Otherwise, it will be impossible. :)

    Pete

    --
    I'm trying a new usenet client for Mac, Nemo OS X.
    You can download it at http://www.malcom-mac.com/nemo

    Comment

    Working...