Beefy Boxes and Bandwidth Generously Provided by pair Networks
P is for Practical
 
PerlMonks  

Re^7: grouping numbers

by QM (Parson)
on Jul 11, 2013 at 14:41 UTC ( #1043740=note: print w/replies, xml ) Need Help??


in reply to Re^6: grouping numbers
in thread grouping numbers

What you're trying to do is cluster analysis - naturally grouping data together in clusters (for some value of "naturally").

Most approaches I'm aware of require you to know the number of clusters ahead of time (which sort of defeats the purpose).

However, if you can come up with some heuristic, such as "any element of a cluster must be within 10% of the center point of the cluster's range", you might be able to quickly compute the results, and live with them. (Of course there are pathological cases where adding a new element changes the center point, causing other elements to be cast out.)

-QM
--
Quantum Mechanics: The dreams stuff is made of

Log In?
Username:
Password:

What's my password?
Create A New User
Node Status?
node history
Node Type: note [id://1043740]
help
Chatterbox?
erix learned the word 'portaging' not so long ago (from vikings lugging their ships from one river-system to another)
[choroba]: my best run so far
[erix]: I think they build a portaging installation for yachts here not so long ago - lemme google it
[erix]: choroba ah, you should have sprinted 7 s off that :)
[erix]: (but then there's always a next (im)possible goal)
Corion avoids running by starting on time
[choroba]: my phone showed me 1 hour 10 km which was my goal, it changed a bit after uploading to the website
[erix]: choroba I believe you ;)

How do I use this? | Other CB clients
Other Users?
Others musing on the Monastery: (9)
As of 2017-05-24 12:50 GMT
Sections?
Information?
Find Nodes?
Leftovers?
    Voting Booth?