DeepLLM Quiz
Machine Learning

Overfitting and model evaluation

10 questions on training and test sets, overfitting, accuracy, precision and recall. Check your machine learning intuition.

  • 10 questions
  • Stopwatch
  • Instant feedback

Shown publicly with your score. Don’t use your full real name.

Sample questions

Play now ↑

Answers stay hidden. Start the quiz to play them.

  1. Sample 1

    A model gets 99% accuracy on its training data but 70% on new data. What is the most likely problem?

    • Overfitting: it memorised details of the training data instead of general patterns
    • Underfitting: it is too simple to learn anything
    • The new data was mislabelled
  2. Sample 2

    A disease affects 1% of patients. A model that always answers healthy has what accuracy?

    • 1%
    • 50%
    • 99%

How it works

  • One question per screen. An answer is final once sent.
  • You see right away whether you were right, with a short explanation.
  • The stopwatch runs: on equal scores, the faster player ranks first.
  • Only your best attempt counts, so replaying is never risky.

About this quiz

A model that scores 99% is not necessarily a good model. It may have memorised its training data, been tested on the wrong examples, or been judged with a metric that hides its failures. Knowing how to evaluate a model is what separates a model that works in a demo from one that works in production, and it is one of the first skills a machine learning practitioner needs.

The central problem is overfitting. A model that overfits learns the details and noise of its training data instead of the general patterns, so it looks excellent on the examples it has seen and disappoints on new ones. A large gap between training performance and performance on new data is the classic warning sign. A model that does badly on both is underfitting, which is a different problem: it is too simple to learn the pattern at all. Remedies for overfitting include more data, simpler models, regularisation that penalises needless complexity, and stopping training once validation performance stops improving.

That is why data is split. A training set is used to fit the model. A validation set is used to compare models and tune settings. A test set, which the model never sees during training, is kept untouched for the final check, because only unseen data shows how well a model generalises. If you tune your model by looking at test scores again and again, you slowly fit the test set too, and its score becomes optimistic. With little data, k-fold cross-validation gives a steadier estimate by training several times and testing on a different part of the data each time.

Choosing the right metric matters just as much. Accuracy is simple, but it can mislead when one class is rare. A screening model for a disease that affects one patient in a hundred can reach 99% accuracy by never finding a single sick patient. Precision tells you how many of the cases the model flags are truly positive. Recall tells you what share of the real positives it finds. Which one to favour depends on the cost of each kind of mistake.

A useful way to hold all this together is to ask what question each number really answers. A training score tells you how well the model fits what it has seen. A validation score tells you which of several choices looks best. A test score tells you what to expect from the real world, once, at the end. Mixing up those three questions is behind many results that looked wonderful in a notebook and fell apart on first contact with real users.

Two traps show up often in practice. Data leakage happens when information from the test set reaches training, for example through duplicate records, and it makes results look better than they will be in real use. Data drift happens after deployment, when the world changes and the data no longer resembles what the model learned, so monitoring and retraining are needed. This quiz has 10 questions on overfitting, data splits, accuracy, precision and recall, leakage, cross-validation and drift. Every answer is explained. It suits students and practitioners who want to check their intuition about model evaluation.

Questions and answers

›How long does the quiz take?

About 3 to 4 minutes for 10 questions at roughly 20 seconds each. You see an explanation after every answer.

›Do I need to know how to code?

No. The questions are about reasoning and examples, not about programming. A basic idea of what a model and a dataset are is enough.

›What is overfitting?

Overfitting is when a model learns the noise and quirks of its training data instead of the general pattern. It scores very well on the data it has seen and badly on new data. The usual sign is a large gap between training performance and performance on unseen data.

›What is the difference between overfitting and underfitting?

An overfitting model is too tuned to its training data, so it does well there and poorly elsewhere. An underfitting model is too simple to capture the pattern, so it does poorly everywhere. The first calls for more data or a simpler, regularised model, and the second for a more capable model or better features.

›Why do we need training, validation and test sets?

The training set fits the model. The validation set is used to compare models and tune settings. The test set is saved for a final, honest estimate on data the model has never influenced. Using one set for all three jobs would give a score that is too optimistic about real performance.

›Why can high accuracy be misleading?

When one class is rare, a model can score high accuracy simply by predicting the common class every time. It would be right almost always and useless for finding the rare cases. Looking at precision and recall, and at how classes are distributed, shows what accuracy hides.

›What is the difference between precision and recall?

Precision is the share of the model's positive predictions that are correct. Recall is the share of all real positives that the model finds. A spam filter with high precision rarely flags good mail. One with high recall catches most spam. Which matters more depends on the cost of each mistake.

›What are data leakage and data drift?

Data leakage is when information from the test data reaches the training process, which makes evaluation scores look better than real performance. Data drift is when real-world data changes over time so that it no longer resembles the training data, which makes a once good model worse. Cleaning data before splitting prevents leakage, and monitoring and retraining handle drift.

More quizzes