List<PrimitivePair> curve = new ArrayList<PrimitivePair>();
double tp = 0;
double fp = 0;
for (int[] counts : examples.values()) {
curve.add(new PrimitivePair(fp / neg, tp / pos));
tp += counts[0];
fp += counts[1];
}
curve.add(new PrimitivePair(fp / neg, tp / pos));
double[][] out = new double[curve.size()][2];
for (int i = 0; i < curve.size(); i++) {
out[i][0] = curve.get(i).second; // tpr