Question 994 of 1,000
Machine Learning and Deep LearningmediumMultiple ChoiceObjective-mapped

Overfitting in Machine Learning: Detection and Solutions

This AI0-001 practice question tests your understanding of machine learning and deep learning. The scenario asks you to isolate a root cause — eliminate options that address a different problem before choosing. After answering, compare your reasoning against the explanation and wrong-answer breakdown below. Once you have made your selection, read the full explanation to reinforce the concept and understand why each distractor is designed to mislead on exam day.

A team trains a random forest model on a dataset with 50 features. The model's performance on the test set is significantly worse than on the training set. Which technique is most appropriate to address this issue?

Quick Answer

The answer is to apply cross-validation to tune hyperparameters and reduce overfitting. This technique directly addresses the core issue of a model memorizing training data rather than generalizing, as cross-validation evaluates performance across multiple data splits, ensuring hyperparameter choices improve test-set accuracy. On the CompTIA AI+ AI0-001 exam, this question tests your understanding of overfitting detection and solutions, specifically distinguishing between dimensionality reduction, model complexity adjustments, and validation strategies. A common trap is assuming PCA or adding more trees always fixes overfitting, but hyperparameter tuning via cross-validation is the most direct and robust first step. Remember the mnemonic: “CV first, then tweak—don’t shrink features or add trees too quick.”

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

Apply cross-validation to tune hyperparameters and reduce overfitting

The model's significantly worse test performance compared to training performance is a classic symptom of overfitting. Cross-validation is the most appropriate technique to address this because it evaluates the model's performance on multiple subsets of the data, providing a more robust estimate of generalization. Tuning hyperparameters (e.g., max_depth, min_samples_split) using cross-validation directly reduces overfitting by constraining model complexity, which is the core issue here.

Key principle: Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Answer analysis

Option-by-option breakdown

For each option: why learners choose it and why it is or isn't the right answer here.

  • Apply cross-validation to tune hyperparameters and reduce overfitting

    Why this is correct

    Cross-validation finds optimal max depth, min samples split, etc., to combat overfitting.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Increase the number of trees in the forest

    Why it's wrong here

    Increasing trees can reduce variance but may not fully address overfitting if other hyperparameters are suboptimal.

  • Use feature scaling

    Why it's wrong here

    Tree-based models do not require feature scaling.

  • Perform PCA to reduce dimensions

    Why it's wrong here

    PCA may help but hyperparameter tuning via cross-validation is more direct.

Common exam traps

Common exam trap: answer the scenario, not the keyword

CompTIA often tests the misconception that increasing model complexity (e.g., more trees) always improves generalization, when in fact the core issue of overfitting is best addressed by validation-based hyperparameter tuning to control model complexity.

Detailed technical explanation

How to think about this question

Random forests reduce overfitting compared to single decision trees by averaging many trees trained on bootstrapped samples and random feature subsets. However, overfitting can still occur if trees are grown to full depth (no pruning) or if the forest has too few trees to stabilize variance. Cross-validation, especially k-fold, provides a reliable estimate of out-of-sample error, allowing you to tune hyperparameters like max_features, min_samples_leaf, and max_depth to find the optimal bias-variance trade-off. In practice, a common mistake is to rely solely on out-of-bag (OOB) error, but cross-validation is more robust for hyperparameter tuning, especially with small datasets.

KKey Concepts to Remember

  • Read the scenario before looking for a memorised answer.
  • Find the constraint that changes the correct option.
  • Eliminate answers that are true in general but not in this case.

TExam Day Tips

  • Watch for words such as best, first, most likely and least administrative effort.
  • Review why wrong options are wrong, not only why the correct option is correct.

Key takeaway

Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option.

Real-world example

How this comes up in practice

A practitioner preparing for the AI0-001 exam encounters this exact type of scenario on the job. The correct answer here is not the most general option — it is the best answer for the specific constraint described. Answer the scenario, not the keyword: identify the specific constraint before choosing the most familiar-sounding option. Real exam questions reward reading the full scenario before eliminating options, because the constraint defines which answer fits.

What to study next

Got this wrong? Here's your next step.

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

Related practice questions

Related AI0-001 practice-question pages

Use these pages to review the topic behind this question. This is how one missed question becomes focused revision.

Practice this exam

Start a free AI0-001 practice session

Short sessions build daily habit. Longer sessions build exam-day stamina. Try a timed session to simulate real conditions.

FAQ

Questions learners often ask

What does this AI0-001 question test?

Machine Learning and Deep Learning — This question tests Machine Learning and Deep Learning — Read the scenario before looking for a memorised answer..

What is the correct answer to this question?

The correct answer is: Apply cross-validation to tune hyperparameters and reduce overfitting — The model's significantly worse test performance compared to training performance is a classic symptom of overfitting. Cross-validation is the most appropriate technique to address this because it evaluates the model's performance on multiple subsets of the data, providing a more robust estimate of generalization. Tuning hyperparameters (e.g., max_depth, min_samples_split) using cross-validation directly reduces overfitting by constraining model complexity, which is the core issue here.

What should I do if I get this AI0-001 question wrong?

Identify which exam domain this question belongs to, review the core concept, then practise similar questions from the same domain.

What is the key concept behind this question?

Read the scenario before looking for a memorised answer.

About these practice questions

Courseiva creates original exam-style practice questions with explanations and wrong-answer analysis. It does not publish real exam questions, exam dumps, or protected exam content. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

Same concept, more angles

4 more ways this is tested on AI0-001

These questions test the same concept from different angles. Work through them to make sure you can recognise it however the exam phrases it.

Variation 1. A team trained a deep neural network on a limited dataset. The training loss decreases consistently, but the validation loss starts increasing after 20 epochs. What is the most likely issue and the best corrective action?

medium
  • A.Vanishing gradient; use ReLU activation
  • B.Overfitting; apply regularization like dropout
  • C.Underfitting; increase model complexity
  • D.Data leakage; reshuffle split

Why B: The training loss decreasing while validation loss increasing after 20 epochs is the classic signature of overfitting: the model has memorized the training data but fails to generalize to unseen data. Applying regularization like dropout forces the network to learn more robust features by randomly dropping neurons during training, reducing overfitting. This is the most direct and effective corrective action for this specific symptom.

Variation 2. A machine learning engineer has a dataset of 100,000 records. She splits it into 70% training, 15% validation, and 15% test sets. After training, the model achieves 95% accuracy on training and 85% on validation. What does the accuracy difference most likely indicate?

easy
  • A.The validation set is too small
  • B.The model generalizes well
  • C.The model is overfitting
  • D.The test set should be larger

Why C: The 10% gap between training accuracy (95%) and validation accuracy (85%) is a classic sign of overfitting. The model has memorized patterns specific to the training set rather than learning generalizable features, causing it to perform worse on unseen validation data. In machine learning, a significant drop in performance from training to validation indicates poor generalization, which is the hallmark of overfitting.

Variation 3. A machine learning engineer is preparing to train a deep neural network for image classification. To avoid overfitting, which TWO techniques should the engineer apply? (Select TWO.)

easy
  • A.Use dropout regularization.
  • B.Use data augmentation.
  • C.Increase the number of layers.
  • D.Remove all non-linear activation functions.
  • E.Reduce the training dataset size.

Why A: Dropout regularization is a technique that randomly drops a fraction of neurons during training, which prevents the network from relying too heavily on any single neuron and reduces co-adaptation. This acts as a form of ensemble learning and significantly reduces overfitting by improving generalization.

Variation 4. Which TWO are valid techniques to reduce overfitting in a deep neural network? (Choose TWO.)

hard
  • A.Increase batch size
  • B.Increase learning rate
  • C.L2 regularization
  • D.Gradient clipping
  • E.Dropout

Why C: L2 regularization (option C) is a valid technique to reduce overfitting by adding a penalty term proportional to the square of the weight magnitudes to the loss function. This discourages the network from learning overly complex patterns, effectively shrinking weights and improving generalization. Dropout (option E) randomly drops a fraction of neurons during training, which prevents co-adaptation of features and forces the network to learn more robust representations, also reducing overfitting.

Keep practising

More AI0-001 practice questions

Last reviewed: Jul 4, 2026

Question Discussion

Share a tip, memory trick, or ask about the reasoning behind this question. Do not post real exam questions, leaked content, braindumps, or copyrighted exam material. Comments are moderated and may be removed without notice.

Loading comments…

Sign in to join the discussion.

This AI0-001 practice question is part of Courseiva's free CompTIA 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 AI0-001 exam.