}
// TEST
Clusterings testing = readClusterings(testingFile.value);
ClusteringEvaluator evaluator = (ClusteringEvaluator) clusteringEvaluatorOption.value;
if (evaluator == null)
evaluator = new ClusteringEvaluators(
new ClusteringEvaluator[] { new BCubedEvaluator(),
new PairF1Evaluator(), new MUCEvaluator(), new AccuracyEvaluator() });
ArrayList<Clustering> predictions = new ArrayList<Clustering>();
for (int i = 0; i < testing.size(); i++) {
Clustering clustering = testing.get(i);
Clustering predicted = clusterer.cluster(clustering.getInstances());
predictions.add(predicted);
logger.info(evaluator.evaluate(clustering, predicted));
}
logger.info(evaluator.evaluateTotals());
// WRITE OUTPUT
ObjectOutputStream oos = new ObjectOutputStream(new FileOutputStream(saveClusterer.value));
oos.writeObject(clusterer);