AI0-001 AI Models and Data Engineering Practice Question
A dataset for a binary classification problem has 95% of samples in class "0" and 5% in class "1". The data scientist trains a logistic regression model and achieves 95% accuracy. Which metric should the scientist primarily use to evaluate model performance?
⚠ Common exam trap
CompTIA often tests the concept that accuracy is a poor metric for imbalanced datasets, trapping candidates who assume high accuracy always indicates good model performance without considering class distribution.
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
✓
Precision, recall, and F1-score.
In a highly imbalanced dataset (95% class 0, 5% class 1), accuracy is misleading because a model can achieve 95% accuracy by simply predicting the majority class for all samples. Precision, recall, and F1-score provide a more nuanced view of performance on the minority class, which is typically the class of interest in binary classification problems. The F1-score, in particular, balances precision and recall, making it the primary metric for evaluating model effectiveness on imbalanced data.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
Precision, recall, and F1-score.
Why this is correct
These metrics evaluate performance on the minority class, crucial for imbalanced data.
- ✗
R-squared.
Why it's wrong here
R-squared is for regression.
- ✗
Accuracy.
Why it's wrong here
Accuracy is high due to majority class, masking poor performance on minority class.
- ✗
Mean squared error.
Why it's wrong here
MSE is for regression, not classification.
About these practice questions
One of 754 original AI0-001 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 by Johnson Ajibi, MSc IT Security
Senior Network & Security Engineer · founder of Courseiva
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.