ArticleslgStudy

science

Precision and recall

Precision and recall is a science topic covered in the lgStudy science library. This page brings together a partial reference excerpt, illustrations, worked examples, real-world applications and a short study plan, so you can understand Precision and recall rather than just read about it. In short: In classification, precision and recall are performance metrics that apply to data retrieved from a collection, corpus or sample space. Precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances.

Precision and recall — main illustration
Precision and recall — illustration

Key takeaways

  • Precision and recall belongs to science; place it in that map before memorising details.
  • Learn the definition first, then one example that makes the definition concrete.
  • Connect Precision and recall to a quantity you can measure, compute or draw — that is where exam questions come from.
  • Reproduce the core statement of Precision and recall from memory before moving on to harder problems.

Reference excerpt

In classification, precision and recall are performance metrics that apply to data retrieved from a collection, corpus or sample space. Precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances. Written as a formula:

Precision = Relevant retrieved instances All retrieved instances {\displaystyle {\text{Precision}}={\frac {\text{Relevant retrieved instances}}{{\text{All }}{\textbf {retrieved}}{\text{ instances}}}}}

Recall (also known as sensitivity) is the fraction of relevant instances that were retrieved. Written as a formula:

Recall = Relevant retrieved instances All relevant instances {\displaystyle {\text{Recall}}={\frac {\text{Relevant retrieved instances}}{{\text{All }}{\textbf {relevant}}{\text{ instances}}}}}

Both precision and recall are therefore based on relevance. Consider a computer program for recognizing dogs (the relevant element) in a digital photograph. Upon processing a picture which contains ten cats and twelve dogs, the program identifies eight dogs. Of the eight elements identified as dogs, only five actually are dogs (true positives), while the other three are cats (false positives). Seven dogs were missed (false negatives), and seven cats were correctly excluded (true negatives). The program's precision is then 5/8 (true positives / selected elements) while its recall is 5/12 (true positives / relevant elements). Adopting a hypothesis-testing approach, where in this case, the null hypothesis is that a given item is irrelevant (not a dog), absence of type I and type II errors (perfect specificity and sensitivity) corresponds respectively to perfect precision (no false positives) and perfect recall (no false negatives). More generally, recall is simply the complement of the type II error rate (i.e., one minus the type II error rate). Precision is related to the type I error rate, but in a slightly more complicated way, as it also depends upon the prior distribution of seeing a relevant vs. an irrelevant item. The above cat and dog example contained 8 − 5 = 3 type I errors (false positives) out of 10 total cats (true negatives), for a type I error rate of 3/10, and 12 − 5 = 7 type II errors (false negatives), for a type II error rate of 7/12. Precision can be seen as a measure of quality, and recall as a measure of quantity. Higher precision means that an algorithm returns more relevant results than irrelevant ones, and high recall means that an algorithm returns most of the relevant results (whether or not irrelevant ones are also returned).

Introduction

… excerpt ends here. Continue reading the full article.

Illustrations

Precision and recall: Precision and recall
Precision and recall
Precision and recall: A dog classifier example. This classifier successfully identified 5 images as containing a dog, but misidentified 3 cats as being dogs.
A dog classifier example. This classifier successfully identified 5 images as containing a dog, but misidentified 3 cats as being dogs.

Worked examples

Example 1 — a first encounter with Precision and recall

Start with the simplest possible case. Write down what Precision and recall claims or describes in one sentence, then invent the smallest concrete situation in which that sentence is true. In science, the smallest case is usually a single object, a single equation or a single measurement. Check that every symbol or term in your sentence has a meaning in that case.

Example 2 — changing one variable

Take the situation from Example 1 and change exactly one quantity: double it, halve it, or set it to zero. Predict what should happen to Precision and recall before you calculate. Comparing your prediction with the result is the fastest way to find out whether you understand the idea or only the words.

Example 3 — an exam-style question

Typical questions about Precision and recall ask you to (a) state it precisely, (b) apply it to given data, and (c) explain a limitation. Practise writing all three answers in under five minutes; the third part is what separates a full-mark answer from an average one.

Applications of Precision and recall

In research
Precision and recall appears in science research whenever the underlying quantities have to be modelled precisely. Papers usually cite it as a starting assumption and then explore where it breaks down.
In technology and industry
Engineering practice reuses Precision and recall in design rules, simulations and safety margins. Knowing the idea lets you read a specification sheet and understand why the numbers look the way they do.
In the classroom
Precision and recall is common in secondary-school and first-year university syllabi. It links to neighbouring topics Bioinformatics, Information retrieval evaluation, Information science, so understanding it makes those chapters shorter.
In everyday life
Look for Precision and recall outside the textbook — in sport, cooking, traffic, electronics or the sky above you. An example you found yourself is remembered far longer than one you were given.

Affiliate

Preply — study more efficiently by working with a personal tutor. 50% off.

How to study Precision and recall in 20 minutes

  1. Read the reference excerpt below once, without taking notes.
  2. Close the page and write down what Precision and recall means in your own words.
  3. Compare your version with the excerpt and mark what you missed.
  4. Work through the three examples above with pen and paper.
  5. Explain Precision and recall out loud to somebody else — or to Teacher Smith in the lgStudy chat.

Frequently asked questions

What is Precision and recall in simple terms?

In classification, precision and recall are performance metrics that apply to data retrieved from a collection, corpus or sample space. Precision (also called positive predictive value) is the fraction of relevant instances among the retrieved instances.

Why does Precision and recall matter?

Because it connects several science ideas at once: it gives you a definition you can apply, a quantity you can calculate, and a way to check whether a result is plausible.

How should I study Precision and recall?

Read the excerpt, restate it from memory, then work through the examples and applications listed on this page. The five-step study plan above takes about twenty minutes.

What does this page cover?

It gives you a compact reference excerpt plus original lgStudy explanations, examples, applications and study material on Precision and recall.

Tags

  • Bioinformatics
  • Information retrieval evaluation
  • Information science

Keep exploring