// create Multi-Level-Clustering
if (cmd.ninitclusters > 0)
{
// k-means initial clustering and random splitting
IClustering clustering1 = clusterNew.kmeans(cmd.ninitclusters, 10);
clustering1.setMetric(cmd.metric);
IClustering clustering2 = clusterNew.random(cmd.nsplit);
//IClustering clustering2 = clusterNew.createKcenter(cmd.nsplit);
clustering2.setMetric(cmd.metric);
// construct multiclustering
//cmd.mc = new MultiClustering(cmd.data.get(0), clustering1, clustering2);
cmd.mc = new MultiClusteringSplitMerge(cmd.data.getSequence(0), clustering1, clustering2);
}
else
{
IClustering clustering2 = clusterNew.randomCompact(cmd.nsplit, 10);
//IClustering clustering2 = clusterNew.createRandom(cmd.nsplit);
//IClustering clustering2 = clusterNew.createKcenter(cmd.nsplit);
clustering2.setMetric(cmd.metric);
cmd.mc = new MultiClusteringSplitMerge(cmd.data.getSequence(0), cmd.initcenters, cmd.metric, clustering2);
}
// fixed initial clustering
/*