Question 290 of 500
Machine Learning and Deep LearninghardMultiple ChoiceObjective-mapped

Quick Answer

The answer is assigning higher class weights to the positive class in the loss function. This technique directly increases the penalty for misclassifying the minority positive samples during backpropagation, forcing the CNN to learn more discriminative features for diabetic retinopathy without altering the original dataset distribution—a critical constraint when no additional labeled data can be obtained. On the CompTIA AI+ AI0-001 exam, this scenario tests your understanding that class imbalance handling techniques like weighting preserve the natural data distribution while improving recall, unlike oversampling or undersampling which risk overfitting or information loss. A common trap is assuming data augmentation alone solves imbalance, but it does not address the gradient dominance of the majority class. For the exam, remember: weights adjust loss, not data—think of it as turning up the volume on minority mistakes.

AI0-001 Machine Learning and Deep Learning Practice Question

This AI0-001 practice question tests your understanding of machine learning and deep learning. Read the scenario carefully and evaluate each option against the stated constraints before committing to an answer. 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 healthcare startup is developing a deep learning model to detect diabetic retinopathy from retinal fundus images. The dataset contains 50,000 images, but only 5% are labeled as positive for the disease. The team uses a convolutional neural network (CNN) with a final sigmoid layer and binary cross-entropy loss. After training for 20 epochs, the model achieves 95% accuracy on the test set, but the recall for the positive class is only 10%. The team suspects the model is biased toward the negative class due to class imbalance. The data is stored in a secure environment, and no additional labeled data can be obtained. The team has access to the following techniques: oversampling the minority class, undersampling the majority class, using class weights in the loss function, applying data augmentation, and using a different architecture. Which course of action is most likely to improve recall for the positive class while maintaining reasonable overall performance?

Clue words in this question

Noticing these words before you look at the options changes how you read each choice.

  • Clue: "most likely"

    Why it matters: Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

Question 1hardmultiple choice
Read the full NAT/PAT explanation →

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

Assign higher class weights to the positive class in the loss function

Assigning higher class weights to the positive class in the loss function directly penalizes misclassifications of the minority class during training. This forces the model to pay more attention to positive samples without altering the dataset distribution, which is critical when no additional labeled data can be obtained and the data is in a secure environment. It improves recall by increasing the gradient contribution from positive samples, while maintaining overall performance because the model still sees the original data distribution.

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.

  • Undersample the majority class to balance the dataset

    Why it's wrong here

    Undersampling discards valuable data and may reduce model performance.

  • Oversample the minority class using synthetic image generation

    Why it's wrong here

    Oversampling can cause overfitting, especially with limited positive samples.

  • Assign higher class weights to the positive class in the loss function

    Why this is correct

    Class weights force the model to focus on the minority class, improving recall.

    Clue confirmation

    The clue word "most likely" in the question point toward this answer.

    Related concept

    Read the scenario before looking for a memorised answer.

  • Replace the CNN with a transformer-based architecture

    Why it's wrong here

    Changing architecture does not directly address class imbalance.

Common exam traps

Common exam trap: answer the scenario, not the keyword

The trap here is that candidates often choose oversampling (Option B) as the default solution for class imbalance, but fail to recognize that synthetic image generation for medical images can introduce unrealistic patterns and is not a standard or safe technique, whereas class weights are a lightweight, data-preserving approach that directly addresses the loss function.

Detailed technical explanation

How to think about this question

Class weighting works by multiplying the binary cross-entropy loss for each positive sample by a weight factor (e.g., weight = number of negative samples / number of positive samples). This effectively increases the loss contribution from positive misclassifications, making the optimizer prioritize learning features that distinguish the minority class. In practice, weights can be computed as inverse class frequencies or using a heuristic like the 'balanced' mode in scikit-learn, and they do not require modifying the dataset or generating synthetic data.

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 small business has 20 workstations on the 192.168.1.0/24 network and one public IP from its ISP. The router uses PAT (NAT overload) so all 20 devices share one public address using different source ports. NAT questions test whether you understand the four address terms and which direction each translation applies.

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: Assign higher class weights to the positive class in the loss function — Assigning higher class weights to the positive class in the loss function directly penalizes misclassifications of the minority class during training. This forces the model to pay more attention to positive samples without altering the dataset distribution, which is critical when no additional labeled data can be obtained and the data is in a secure environment. It improves recall by increasing the gradient contribution from positive samples, while maintaining overall performance because the model still sees the original data distribution.

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.

Are there clue words in this question I should notice?

Yes — watch for: "most likely". Probability qualifier — the question wants the most probable cause or outcome, not a guaranteed one. Eliminate low-probability options.

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

2 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 fraud detection model is trained on a dataset where only 0.1% of transactions are fraudulent. The model achieves 99.9% accuracy but fails to catch most frauds. Which metric should the team prioritize, and which technique could help?

hard
  • A.Mean Squared Error; use L2 regularization
  • B.F1 score; use principal component analysis
  • C.Accuracy; collect more data
  • D.Precision-Recall AUC; use oversampling like SMOTE

Why D: With severe class imbalance, accuracy is misleading. Precision-Recall AUC focuses on minority class, and SMOTE oversamples it.

Variation 2. A financial institution uses a deep learning model for fraud detection. The model is a feedforward neural network with three hidden layers. It was trained on a balanced dataset of 100,000 transactions. During deployment, the model achieves high accuracy on the test set but the fraud detection rate (true positive rate) is only 40% while the false positive rate is 0.1%. The business requires a true positive rate of at least 80%. Which of the following actions is most likely to achieve the required true positive rate while minimizing the increase in false positives?

hard
  • A.Increase the number of hidden layers to five to capture more complex patterns
  • B.Use synthetic minority oversampling (SMOTE) to rebalance the training set
  • C.Change the threshold for classifying a transaction as fraud from the default 0.5 to a lower value
  • D.Add L2 regularization to reduce overfitting

Why C: Option A (more hidden layers) may not improve recall and could overfit. Option C (L2 regularization) would increase bias, likely lowering TPR. Option D (SMOTE) rebalances training but the model already trained on balanced data; threshold adjustment is more direct. Option B (lower decision threshold) directly increases TPR at the cost of FPR; threshold can be tuned to achieve 80% TPR with minimal FPR increase.

Last reviewed: Jun 24, 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.