public double averagePrecision() { double ret = 0.0; for (int i = 0; i < numLabels(); i++) { ret += precision(i); } ret /= (double) numLabels(); return ret; }
/** * Calculate the G-measure for the given output * * @param output The specified output * @return The G-measure for the specified output */ public double gMeasure(int output) { double precision = precision(output); double recall = recall(output); return EvaluationUtils.gMeasure(precision, recall); }
/** * Calculate the F-beta value for the given output * * @param beta Beta value to use * @param outputNum Output number * @return F-beta for the given output */ public double fBeta(double beta, int outputNum) { assertIndex(outputNum); double precision = precision(outputNum); double recall = recall(outputNum); return EvaluationUtils.fBeta(beta, precision, recall); }
double precision = precision(i); double recall = recall(i);