http://qs321.pair.com?node_id=1214547


in reply to Groups of Objects with Common Attributes

k-means clustering ? --> Algorithm::KMeans

update

With aforementioned module you can even choose the range of permitted clusters

# For very large data files, setting K to 0 will result in searching + through too # many values for K. For such cases, you can range limit the values + of K to search # through by my $clusterer = Algorithm::KMeans->new( datafile => $datafile, mask => "N111", Kmin => 3, Kmax => 10, cluster_seeding => 'random', + # or 'smart' terminal_output => 1, write_clusters_to_files => 1 +, );

Cheers Rolf
(addicted to the Perl Programming Language and ☆☆☆☆ :)
Wikisyntax for the Monastery