<NME> BucketerTest.java
<BEF> package edu.neu.ccs.pyramid.calibration;


public class BucketerTest {
    public static void main(String[] args) {
        test1();
    }


    public static void main(String[] args) throws Exception {
        test1();
    }


        System.out.println(Bucketer.groupWithEqualSize(x,y,2));
    }

}

        Bucketer.Result result  = Bucketer.groupWithEqualSize(x,y,1000);
        System.out.println(result);
        IsotonicRegression isotonicRegression = new IsotonicRegression(x,y,false);
        double[] prediction = Arrays.stream(result.averageX).map(isotonicRegression::predict).toArray();
        System.out.println("prediction");
        System.out.println(Arrays.toString(prediction));

        String dis = Displayer.displayCalibrationResult(IntStream.range(0,dataSet.getNumDataPoints()).mapToObj(i-> new Pair<>(isotonicRegression.predict(dataSet.getRow(i).get(1)),dataSet.getLabels()[i])));
        System.out.println(dis);
    }



}
<MSG> printing

<DFF> @@ -1,9 +1,13 @@
 package edu.neu.ccs.pyramid.calibration;
 
 
+import edu.neu.ccs.pyramid.dataset.DataSetType;
+import edu.neu.ccs.pyramid.dataset.RegDataSet;
+import edu.neu.ccs.pyramid.dataset.TRECFormat;
+
 public class BucketerTest {
-    public static void main(String[] args) {
-        test1();
+    public static void main(String[] args) throws Exception {
+        test2();
     }
 
 
@@ -15,4 +19,17 @@ public class BucketerTest {
         System.out.println(Bucketer.groupWithEqualSize(x,y,2));
     }
 
+
+    private static void test2() throws Exception{
+        RegDataSet dataSet = TRECFormat.loadRegDataSet("/Users/chengli/tmp/iso/LRout7/dump", DataSetType.REG_SPARSE,true);
+        double[] x = new double[dataSet.getNumDataPoints()];
+        double[] y = new double[dataSet.getNumDataPoints()];
+        for (int i=0;i<dataSet.getNumDataPoints();i++){
+            x[i] = dataSet.getRow(i).get(1);
+            y[i] = dataSet.getLabels()[i];
+        }
+
+        System.out.println(Bucketer.groupWithEqualSize(x,y,100));
+
+    }
 }
\ No newline at end of file

printing