@@ -0,0 +1,1929 @@
+package edu.neu.ccs.pyramid.experiment;%0A%0Aimport edu.neu.ccs.pyramid.configuration.Config;%0Aimport edu.neu.ccs.pyramid.dataset.DataSetType;%0Aimport edu.neu.ccs.pyramid.dataset.MultiLabel;%0Aimport edu.neu.ccs.pyramid.dataset.MultiLabelClfDataSet;%0Aimport edu.neu.ccs.pyramid.dataset.TRECFormat;%0Aimport edu.neu.ccs.pyramid.eval.Accuracy;%0Aimport edu.neu.ccs.pyramid.eval.Overlap;%0Aimport edu.neu.ccs.pyramid.multilabel_classification.bmm_variant.BMMClassifier;%0Aimport edu.neu.ccs.pyramid.util.Serialization;%0A%0Aimport java.io.File;%0Aimport java.util.ArrayList;%0Aimport java.util.Arrays;%0Aimport java.util.List;%0A%0A/**%0A * cluster vs performance plot%0A * Created by chengli on 1/26/16.%0A */%0Apublic class Exp144 %7B%0A    private static final Config config = new Config(%22config/local.config%22);%0A    private static final String DATASETS = config.getString(%22input.datasets%22);%0A    private static final String TMP = config.getString(%22output.tmp%22);%0A%0A    public static void main(String%5B%5D args) throws Exception%7B%0A        String folder = %22/Users/chengli/Documents/mixture_analysis/cluster_models/%22;%0A        MultiLabelClfDataSet testSet = TRECFormat.loadMultiLabelClfDataSet(new File(DATASETS, %22nuswide-128/data_sets/test%22),%0A                DataSetType.ML_CLF_DENSE, true);%0A        int%5B%5D clusters = %7B1,5,10,15,20,25,30,35,40%7D;%0A        List%3CDouble%3E accs = new ArrayList%3C%3E();%0A        List%3CDouble%3E overlaps = new ArrayList%3C%3E();%0A        for (int k:clusters)%7B%0A            System.out.println(k);%0A            BMMClassifier bmmClassifier = (BMMClassifier) Serialization%0A                    .deserialize(folder+k);%0A            MultiLabel%5B%5D pred = bmmClassifier.predict(testSet);%0A            accs.add(Accuracy.accuracy(testSet.getMultiLabels(), pred));%0A            overlaps.add( Overlap.overlap(testSet.getMultiLabels(), pred));%0A        %7D%0A        System.out.println(Arrays.toString(clusters));%0A        System.out.println(accs);%0A        System.out.println(overlaps);%0A    %7D%0A%7D%0A

add Exp144