Measure

# f_measure

The F-Measure is the harmonic mean of precision and recall, also known as the the traditional F-measure, balanced F-score, or F1-score: Formula: 2*Precision*Recall/(Precision+Recall) See: http://en.wikipedia.org/wiki/Precision_and_recall F-measure is defined only for a specific class value, and should thus be labeled with the class value for which is was computed. Use the mean_weighted_f_measure for the weighted average over all class values.

Source Code:
WEKA's Evaluation.fMeasure(int classIndex):

/**
* Calculate the F-Measure with respect to a particular class.
* This is defined as
*    * 2 * recall * precision
* ----------------------
*   recall + precision
*
*
* @param classIndex the index of the class to consider as "positive"
* @return the F-Measure
*/
public double fMeasure(int classIndex) {

double precision = precision(classIndex);
double recall = recall(classIndex);
if ((precision + recall) == 0) {
return 0;
}
return 2 * precision * recall / (precision + recall);
}

## Properties

 Minimum value 0 Maximum value 0 Unit Optimization Higher is better