@Override
public Vector classify(Vector data, ClusterClassifier prior) {
Collection<SoftCluster> clusters = Lists.newArrayList();
List<Double> distances = Lists.newArrayList();
for (Cluster model : prior.getModels()) {
SoftCluster sc = (SoftCluster) model;
clusters.add(sc);
distances.add(sc.getMeasure().distance(data, sc.getCenter()));
}
FuzzyKMeansClusterer fuzzyKMeansClusterer = new FuzzyKMeansClusterer();
fuzzyKMeansClusterer.setM(m);
return fuzzyKMeansClusterer.computePi(clusters, distances);
}