AI0-001 Machine Learning and Deep Learning Practice Question
A data scientist is building a classification model to detect fraudulent transactions. The dataset is highly imbalanced with only 1% fraudulent cases. Which approach should the scientist use to evaluate model performance most effectively?
⚠ Common exam trap
CompTIA often tests the misconception that accuracy is always the best metric for classification, but in imbalanced datasets, accuracy is a trap because it does not reflect performance on the minority class, leading candidates to overlook metrics like F1 score that directly address class imbalance.
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
✓
F1 score
In highly imbalanced datasets like fraud detection (1% positive class), accuracy is misleading because a model that predicts all transactions as legitimate would achieve 99% accuracy yet fail to detect any fraud. The F1 score (harmonic mean of precision and recall) is the most effective metric because it balances both false positives and false negatives, providing a single score that reflects the model's ability to correctly identify the minority class without being skewed by class imbalance.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✓
F1 score
Why this is correct
F1 score suits this imbalanced fraud scenario because it combines precision and recall into a single harmonic mean, so strong performance on the 1% fraudulent minority cannot be masked by the 99% legitimate majority. Accuracy would mislead here, since predicting every transaction as legitimate already yields 99%.
- ✗
Accuracy
Why it's wrong here
With only 1% fraud, a model predicting everything as legitimate reaches 99% accuracy while catching zero fraud, so accuracy cannot discriminate. It is tempting because it summarises overall correctness on balanced datasets, where it would be the natural headline metric.
- ✗
Recall
Why it's wrong here
Recall measures the proportion of actual frauds detected, so a model flagging everything scores 100% while generating overwhelming false positives. Precision-recall AUC or F1 balances both, which is why recall alone misleads on imbalanced data.
- ✗
Precision
Why it's wrong here
Precision alone ignores false negatives, so a model flagging almost nothing scores highly while missing most fraud. It is tempting because precision matters when false positives are costly, such as blocking legitimate card transactions, but recall or F1 must accompany it on a 1% imbalanced dataset.
About these practice questions
This AI0-001 question is part of Courseiva's 962-question bank — original exam-style content with full explanations and wrong-answer analysis, never real exam questions or exam 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 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.