public double averageGMeasure() {
        double ret = 0.0;
        for (int i = 0; i < numLabels(); i++) {
            ret += gMeasure(i);
        }