|
How to compute the global precision given the precision calculated for each class, (after classification) ? Is it just the average over classes precisions ? When I use Weka the global precision is not computed as the average one, but as a "weighted average" and I don't know how this later is computed (weighted by what?). See the example bellow of the results that we get with Weka, can you please tell me how "Weighted Avg." is computed in this result (last line) ? === Detailed Accuracy By Class ===
|
|
The weighted average is computed by weighting the measure of class (TP rate, precision, recall ...) by the proportion of instances there are in that class. Computing the average can be sometimes be misleading. For instance, if class 1 has 100 instances and you achieve a recall of 30%, and class 2 has 1 instance and you achieve recall of 100% (you predicted the only instance correctly), then when taking the average (65%) you will inflate the recall score because of the one instance you predicted correctly. Taking the weighted average will give you 30.7%, which is much more realistic measure of the performance of the classifier. NB: I gave an example with two classes, but in fact the weighted average make sense only when you have more then two classes. When you have only two classes weighting does not make sense, and the measures should be computed relative to the minority class. In other words, you are interested to know if you are able to detect the minority. So in this case the weighted average recall will be exatly the same as the recognition rate (accuracy), right ?
(Jan 27 '13 at 06:47)
shn
|