throws IOException, InterruptedException {
Vector pi = new DenseVector(clusters.size());
for (int i = 0; i < clusters.size(); i++) {
pi.set(i, clusters.get(i).getModel().pdf(vector));
}
pi = pi.divide(pi.zSum());
if (emitMostLikely) {
emitMostLikelyCluster(vector, clusters, pi, context);
} else {
emitAllClusters(vector, clusters, pi, context);
}