@Test
public void testSoftClusterClassification() {
List<Model<VectorWritable>> models = new ArrayList<Model<VectorWritable>>();
DistanceMeasure measure = new ManhattanDistanceMeasure();
models.add(new SoftCluster(new DenseVector(2).assign(1), 0, measure));
models.add(new SoftCluster(new DenseVector(2), 1, measure));
models.add(new SoftCluster(new DenseVector(2).assign(-1), 2, measure));
AbstractVectorClassifier classifier = new VectorModelClassifier(models);
Vector pdf = classifier.classify(new DenseVector(2));
assertEquals("[0,0]", "[0.000, 1.000, 0.000]", AbstractCluster.formatVector(pdf, null));
pdf = classifier.classify(new DenseVector(2).assign(2));
assertEquals("[2,2]", "[0.735, 0.184, 0.082]", AbstractCluster.formatVector(pdf, null));