# Should the mean precision and recall be weighted?

I have a bunch of experiments in which I am calculating precision and recall. I want to present a mean precision and recall for these experiments. Should these values be weighted by anything?

• In general I would not recommend attempting to define any sort of "mean" across values from different experiments, unless you have a clear idea of what these "means" are supposed to represent. Otherwise you will usually be computing a "statistic" which is useless at best and misleading at worst. Mar 9, 2011 at 11:23
• I would generally agree but these experiments are very much related. Mar 9, 2011 at 16:39
• Sorry, but your question is rather general ... can you provide how this experiments are related ? If they originate from different folds of a x-validation, an unweighted average is (of course ;)) meaningful, but in general this question is hard to answer. Mar 10, 2011 at 14:49

It would be good to know more about the experiments. But there's two main ways (at least in information retrieval) of averaging contingency-table based measures like recall and precision:

1. Compute the individual measures for each experiment and take the unweighted average ("macroaveraging").

2. Add up the contingency tables and compute the measures from the summed contingency table ("microaveraging").

The usual reference on these is

Tague, J. The pragmatics of information retrieval experimentation. In Information Retrieval Experiment, Butterworths, London, 1981, pp 59-102.

Yang, Rose, Li, and I also discuss these two approaches, and provide sample data sets in RCV1: A New Benchmark Collection for Text Categorization Research.

• Note that if you calculating F-measures, you should use microaveraging - macro averaged F-measures can be misleading. I can dig up a paper investigating this if you're interested. Sep 17, 2016 at 15:50
• I'd be interested in the particular reference you mention, but either or both of microaveraging and macroaveraging can be misleading. It all depends on what property of the system you're trying to understand. We discuss this a bit in the RCV1 paper cited above. Sep 18, 2016 at 12:47
• "Apples-to-apples in cross-validation studies: pitfalls in classifier performance measurement", George Forman, Martin Scholz, dl.acm.org/citation.cfm?id=1882479, ACM SIGKDD Explorations Newsletter, 2010 Sep 20, 2016 at 11:07
• The Forman paper isn't discuss averaging across multiple classification tasks, which I believe is what the original poster was interested in. It's talking about averaging across partitions in cross-validation: that's a much trickier issue. Sep 22, 2016 at 9:16
• I'd almost argue that averaging across multiple tasks is a trickier issue.. Yes, you're right, I realised it was different when I looked it up, but it does illustrate some potential pitfalls. In any case, I'll go read you paper when I've a moment - sounds interesting (: Sep 23, 2016 at 15:33