HelpContactFor teachers and institutes
>_StemPy Lab
Mock TestsClasses

>_StemPy Lab

Learn. Solve. Code the solutions. Test yourself.

Live examsFree mock exams, timed and rankedEveryone starts together, and your score and rank come the moment it ends.See the exams →

Learn

  • Physics
  • Chemistry
  • Mathematics
  • Biology
  • Python Programming
  • Statistics & Data Science
  • Computer Science
  • Classes
  • Groups

Practice

  • Problems
  • Quizzes
  • Mock Tests
  • Prepare for an Exam
  • Question Sets
  • Exams
  • Certificates
  • Python Labs
  • AI Practice Generator
  • Student-Created Tests

Community

  • Discussions
  • Resources
  • Notes
  • Glossary
  • Blog

Account

  • Log in
© 2026 senLearn. All rights reserved.HelpFor SchoolsAboutContactPrivacy PolicyTerms of UseRefund Policy
  1. Problems
  2. /A filter calls an email unwanted when its score is greater than its dividing line T…
HardComputer ScienceHigh School (9–10)Computer Science › Automated and Emerging TechnologiesNumericalIGCSE

A filter calls an email unwanted when its score is greater than its dividing line T…

StemPy LabContributed by StemPy Lab

Try it on paper first. A hint, the key idea and the worked solution are here when you need them.

A filter calls an email unwanted when its score is greater than its dividing line TTT. It starts with T=10T = 10T=10. After each email it checks the user's label:

  • if it called a wanted email unwanted, it adds 111 to TTT;
  • if it called an unwanted email wanted, it takes 111 from TTT;
  • if it was right, TTT stays the same.

Five emails arrive in this order, as (score, label): (12, wanted)(12,\ \text{wanted})(12, wanted), (9, unwanted)(9,\ \text{unwanted})(9, unwanted), (11, wanted)(11,\ \text{wanted})(11, wanted), (13, unwanted)(13,\ \text{unwanted})(13, unwanted), (10, unwanted)(10,\ \text{unwanted})(10, unwanted).

Trace the filter. How many mistakes does it make, and what is TTT at the end?

Check your answer

Work it out on paper, then type your number. The answer itself stays hidden.

Need a reminder? The key ideaShowHide

Machine learning is when a program has the ability to automatically adapt its own processes and/or data. It learns from examples (training data). An expert system's rules are written by people; a learning program adapts its own rules and data.

The worked solution

Have you tried it?

Work it out on paper first. It is fine to get stuck or make a mistake: that is how we learn. When you are ready, go through the solution one step at a time, and check each step against your own.

Plan. One email at a time: predict with the current TTT, compare with the label, then change TTT if needed.

  • (12,wanted)(12, \text{wanted})(12,wanted), T=10T = 10T=10: 12>1012 > 1012>10, so it calls it unwanted. Wrong: TTT becomes 111111.
  • (9,unwanted)(9, \text{unwanted})(9,unwanted), T=11T = 11T=11: 9>119 > 119>11 is false, so it calls it wanted. Wrong: TTT becomes 101010.
  • (11,wanted)(11, \text{wanted})(11,wanted), T=10T = 10T=10: 11>1011 > 1011>10, so unwanted. Wrong: TTT becomes 111111.
  • (13,unwanted)(13, \text{unwanted})(13,unwanted), T=11T = 11T=11: 13>1113 > 1113>11, so unwanted. Right: TTT stays 111111.
  • (10,unwanted)(10, \text{unwanted})(10,unwanted), T=11T = 11T=11: 10>1110 > 1110>11 is false, so wanted. Wrong: TTT becomes 101010.

Answer: 444 mistakes, and T=10T = 10T=10 at the end.

What it shows. The program automatically changes its own data, the value of TTT, after each mistake. These five emails pull TTT both ways, so it ends where it started: a few examples are not enough to learn a good line.

Log in to save this for later
← All Problems
← A bank wants software to decide which card payments might be fraud…Next →
More onComputer Science › Automated and Emerging Technologies

Discussion (0)

Log in to join the discussion.

Loading…

More on this topic

  1. A bank wants software to decide which card payments might be fraud…Hard
  2. A learning filter is given eight emails that users have labelled…Medium
  3. An email service has a filter that moves unwanted messages into a separate folder…Medium
  4. A health centre in a remote area uses an expert system to help a nurse decide whether a patient…Hard
  5. A small expert system for identifying animals has five rules…Hard
All problems on this topic →