Courseiva

AI0-001 Machine Learning and Deep Learning Practice Question

A data scientist is training a binary classification model to detect fraudulent transactions. The dataset is highly imbalanced with 99% legitimate and 1% fraudulent. Which evaluation metric should be prioritized to assess model performance?

⚠ Common exam trap

It's easy for candidates to default to accuracy as the primary metric, not realizing that in highly imbalanced scenarios, accuracy can be artificially high and meaningless, while the F1-score reveals the true performance on the minority class.

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 a highly imbalanced dataset (99% legitimate, 1% fraudulent), accuracy is misleading because a model that predicts all transactions as legitimate would achieve 99% accuracy without detecting any fraud. The F1-score combines precision and recall into a single metric, making it the preferred choice for evaluating binary classification performance on imbalanced data, as it penalizes both false positives and false negatives equally.

Answer analysis

Option-by-option breakdown

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

  • ✗

    Accuracy

    Why it's wrong here

    Accuracy counts correct predictions across both classes, so predicting every transaction as legitimate yields 99% while catching no fraud. It is tempting because it is intuitive and universally reported, but on a 99:1 imbalance it hides minority-class failure; precision-recall or PR-AUC exposes the fraud detection performance that matters.

  • ✓

    F1-score

    Why this is correct

    With 99% legitimate transactions, accuracy is misleading because a model predicting all legitimate scores 99%. F1-score balances precision and recall on the minority fraudulent class, exposing poor detection that accuracy hides, making it the appropriate metric for this imbalanced binary classification task.

  • ✗

    Mean Squared Error

    Why it's wrong here

    Mean Squared Error measures regression error between continuous values, not classification outcomes; applying it to binary labels ignores the decision threshold and class imbalance entirely. It is tempting because it is a familiar, simple loss function, but it belongs to regression tasks, whereas fraud detection requires precision-recall or PR-AUC.

  • ✗

    Log Loss

    Why it's wrong here

    Log Loss averages probability error across all predictions, so the 99% legitimate majority dominates and a model ignoring fraud can still score well. It is tempting because it evaluates calibrated probabilities rather than hard labels, which suits balanced probabilistic forecasting, but this scenario needs precision-recall or PR-AUC on the minority class.

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 →

How Courseiva writes practice questions · Editorial policy

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.