for (Cluster model : models) {
SoftCluster sc = (SoftCluster) model;
clusters.add(sc);
distances.add(sc.getMeasure().distance(instance, sc.getCenter()));
}
return new FuzzyKMeansClusterer().computePi(clusters, distances);
} else {
int i = 0;
Vector pdfs = new DenseVector(models.size());
for (Cluster model : models) {
pdfs.set(i++, model.pdf(new VectorWritable(instance)));