NCA-GENL Core Machine Learning and AI Knowledge Practice Question
An ML engineer trains a sentiment classifier on 10,000 movie reviews but only 300 are negative. The model predicts positive for nearly every review, including obvious negative ones. Which technique best addresses this class imbalance during training?
⚠ Common exam trap
The trap here is assuming that more training or stronger regularization fixes imbalance, when the real issue is that the loss function ignores how rare the negative class is.
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 class weighting in the loss function to penalize errors on the minority class more heavily
With only 300 negative examples against 9,700 positive ones, an unweighted loss is minimized by predicting the majority class. Applying class weights in the loss raises the cost of minority-class errors, forcing the model to learn features that separate negative reviews. This is the most direct and least invasive fix for the skewed decision boundary.
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 class weighting in the loss function to penalize errors on the minority class more heavily
Why this is correct
Weighting the loss inversely to class frequency increases the gradient contribution of the 300 negative examples, so the optimizer can no longer minimize loss by always predicting the majority class. This directly counteracts the imbalance without discarding data or fabricating examples, and it is a standard, low-risk first remedy for skewed binary classification.
- ✗
Normalize the input text by lowercasing and removing stopwords
Why it's wrong here
Text normalization reduces vocabulary variance and can slightly help generalization, but it does not alter the ratio of positive to negative labels. The model would still be rewarded for defaulting to the majority class. Preprocessing is orthogonal to the imbalance problem, so it cannot resolve the systematic misclassification of negative reviews.
- ✗
Add L2 regularization to all model weights
Why it's wrong here
L2 regularization penalizes large weights to reduce overfitting and improve generalization, but it does not change how errors on minority examples are counted. With 300 negatives against 9,700 positives, the loss surface still favors the majority class, so regularization alone will not fix the biased predictions observed on the negative reviews.
- ✗
Increase the learning rate and train for more epochs
Why it's wrong here
A larger learning rate with additional epochs changes optimization dynamics but leaves the underlying class distribution untouched. The model can still reach a low-loss solution that labels almost everything positive, since predicting the majority class minimizes unweighted loss. This approach risks divergence or overfitting rather than correcting the skewed decision boundary.
About these practice questions
One of 367 original NCA-GENL practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
JA
Written and reviewed by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
Last reviewed September 2026 · checked against the official NVIDIA exam blueprint
This NCA-GENL practice question is part of Courseiva's free NVIDIA 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 NCA-GENL exam.