AI-900 Practice Question: Describe fundamental principles of machine learning on Azure
A data scientist is developing a classification model to detect fraudulent transactions. The dataset is split into training and test sets. The data scientist repeatedly tunes the model's hyperparameters and evaluates performance on the test set until the test accuracy reaches 95%. However, when the model is deployed on new, unseen data, its accuracy drops to 70%. Which concept best explains this performance degradation?
⚠ Common exam trap
Candidates often confuse overfitting to the training data with overfitting to the test set, failing to recognize that repeatedly evaluating on the test set can cause the model to memorize test set patterns rather than generalize.
Answer choices
Why each option matters
Answer the question above first, then reveal the full breakdown to understand why each option is right or wrong.
Correct answer & explanation
✓
Overfitting to the test set
The data scientist repeatedly tuned hyperparameters based on test set performance, effectively using the test set as part of the training process. This causes the model to become specialized to the test set's specific patterns and noise, so it fails to generalize to new, unseen data. This phenomenon is known as overfitting to the test set, where the test set no longer provides an unbiased estimate of real-world performance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Overfitting to the training data
Why it's wrong here
Overfitting to the training data would show up as very high accuracy on the exact examples used for training, but much lower accuracy on a separate test set. This scenario does not describe training accuracy at all; the 95% figure is explicitly the test set accuracy, and the tuning process repeatedly consulted the test set rather than the training set. The failure mode is adaptation to the test data, not memorization of training labels, so this option misidentifies the mechanism.
- ✗
Data leakage from the training set to the test set
Why it's wrong here
Data leakage typically occurs when test-set information (for example, target labels, or statistics such as mean and variance from the full dataset) is inadvertently used during training, such as when scaling transformers are fitted on training and test data together. Here, the test set is used only to evaluate and select hyperparameters, and no test labels are supplied to the learning algorithm itself. The model's parameters are not trained on test examples, so this is not classic leakage; instead it is a form of selection bias caused by tuning on the test set.
- ✓
Overfitting to the test set
Why this is correct
This is correct. When hyperparameters are tuned by repeatedly evaluating against the same test set, the model selection process implicitly 'fits' the test set just as a gradient descent fits the training set. The model becomes tailored to the random noise and idiosyncrasies of that specific test sample, so its apparent 95% accuracy is optimistically biased and will not replicate on fresh data. This is sometimes called test set overfitting or 'testing hypotheses on the test set,' and it inflates reported performance relative to true generalization.
- ✗
Underfitting the training data
Why it's wrong here
Underfitting is a bias problem where the model is too simplistic to capture the underlying patterns, causing poor performance on both training and test data alike. Since the tuned model reportedly reaches 95% accuracy on the test set, it is clearly not underfitting at that stage. The subsequent failure on new, unseen data is not due to an overly simple model, but to the fact that the test set was used during the tuning loop, so the model was effectively selected to match that particular test set rather than to generalize.
Go deeper
Related to this question
Learn chapter
Regression and Classification
Key term
Overfitting
Overfitting occurs when a machine learning model learns the training data too well, including its noise and outliers, causing it to perform poorly on new, unseen data.
Key term
Model
In IT and AI, a model is a trained mathematical representation that learns patterns from data to make predictions or decisions.
About these practice questions
Courseiva writes every AI-900 question from scratch — 985 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →
JA
Written by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
This AI-900 practice question is part of Courseiva's free Microsoft certification practice question bank. Courseiva provides original exam-style practice questions with explanations, topic-based practice, mock exams, readiness tracking, and study analytics to help learners prepare for the AI-900 exam.