public double score(Clustering clustering) {
Clustering singletons = ClusterUtils
.createSingletonClustering(clustering.getInstances());
double total = 0;
int count = 0;
for (AllPairsIterator iter = new AllPairsIterator(singletons); iter
.hasNext(); count++) {
Instance instance = (Instance) iter.next();
AgglomerativeNeighbor neighbor = (AgglomerativeNeighbor) instance
.getData();
double score = evaluator.evaluate(neighbor);
int[][] clusters = neighbor.getOldClusters();
if (clustering.getLabel(clusters[0][0]) == clustering