Subscribe to DSC Newsletter

Very short and simple source code to produce nice simulated cluster structures (stored in a text file called cluster.txt) and test cluster detection algorithms. The version below is written in Perl, and here's an example of output with 3 simulated clusters:

`rm cluster.txt`;


sub seed {

local($x,$y)[email protected]_;
#print "==$x == $y\n";

for ($k=0; $k<$kmax; $k++) {

for ($k=0; $k<$kmax; $k++) {
print OUT "$cluster\t$px[$k]\t$py[$k]\n";


Views: 2873

Replies to This Discussion

Similar code in PHP attached to this comment.



Follow Us

On Data Science Central

On DataViz

On Hadoop

© 2018 is a subsidiary and dedicated channel of Data Science Central LLC   Powered by

Badges  |  Report an Issue  |  Terms of Service