runSequentialDirichletClusterer(input, output, modelDist, numClusters, numIterations, alpha0);
} else {
runSequentialDirichletClassifier(input, output, modelDist, numClusters, numIterations, alpha0);
}
for (int i = 1; i <= numIterations; i++) {
ClusterClassifier posterior = new ClusterClassifier();
String name = i == numIterations ? "clusters-" + i + "-final" : "clusters-" + i;
posterior.readFromSeqFiles(new Configuration(), new Path(output, name));
List<Cluster> clusters = Lists.newArrayList();
for (Cluster cluster : posterior.getModels()) {
if (isSignificant(cluster)) {
clusters.add(cluster);
}
}
CLUSTERS.add(clusters);