What is the f-measure for each class in weka

When we evaluate a classifier in WEKA, for example a classifier of the 2nd class, it gives us 3 f-measures: an f-measure for class 1 for a class 2 and a weighted f-measure.

I'm so confused! I thought f-measure is a balanced measure that shows balanced performance for several classes, so what does f-measure mean for classes 1 and 2?

+6
source share
1 answer

The f-score (or f-measure) is calculated based on accuracy and recall. The calculation is as follows:

Precision = t_p / (t_p + f_p) Recall = t_p / (t_p + f_n) F-score = 2 * Precision * Recall / (Precision + Recall) 

Where t_p is the number of true positive values, f_p number of false positives and f_n number of false negatives. Accuracy is defined as the proportion of elements correctly classified as positive of all elements that the algorithm is classified as positive, while recall that the proportion of elements correctly classified as positive of all positive elements.

In the multiclass case, each class i has a corresponding accuracy and recall in which the “true positive result” is the element that is expected to be in i , really is in it, and the “true negative” is the element predicted that it is not in i which is not in it.

Thus, with this new definition of accuracy and recall, each class can have its own f-point, performing the same calculation as in the binary case. This is what Vaca will show you.

The weighted f-point is the weighted average of the f-points of classes, weighted by the proportion of the number of elements in each class.

+13
source

All Articles