Courseiva
Implementing AI Solutions →mediumMultiple Select

AI0-001 Implementing AI Solutions Practice Question

A data science team is preparing a dataset for a binary classification model to detect fraudulent transactions. The dataset has 99% legitimate and 1% fraudulent examples. Which TWO techniques should the team apply to improve model performance on the minority class?

⚠ Common exam trap

The trap is confusing general data preprocessing steps (normalization, shuffling) with techniques specifically designed to handle class imbalance, leading candidates to select options that do not address the core issue.

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

✓

Use class weights in the loss function

Option A is correct because assigning class weights in the loss function (e.g., class_weight='balanced' in scikit-learn or a weighted binary cross-entropy) penalizes misclassification of the 1% fraudulent class more heavily, directly countering the 99:1 imbalance during training. Option B is correct because SMOTE (Synthetic Minority Over-sampling Technique) generates synthetic minority-class samples by interpolating between existing fraudulent examples and their k-nearest neighbors, increasing minority representation and helping the model learn the fraudulent decision boundary. Option C is not selected because random undersampling discards potentially useful majority-class data and can increase variance, making it a less preferred technique here. Option D is not selected because z-score normalization only rescales feature distributions and does nothing to address class imbalance. Option E is not selected because shuffling prevents ordering bias and train/test leakage but has no effect on the skewed class ratio.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Use class weights in the loss function

    Why this is correct

    Class weights scale the loss contribution of each class inversely to its frequency, so the 1% fraudulent examples penalise errors far more heavily. This shifts the decision boundary toward the minority class without altering the underlying 99:1 data distribution.

  • ✓

    Oversample the minority class using SMOTE

    Why this is correct

    SMOTE synthesises new minority-class examples by interpolating between existing fraudulent transactions and their nearest minority neighbours, rather than duplicating them. This balances the 99:1 ratio and gives the classifier denser decision regions for the minority class.

  • ✗

    Undersample the majority class randomly

    Why it's wrong here

    Random undersampling discards majority-class examples, reducing the 99% legitimate data but also losing information and risking underfitting. It is tempting because it directly balances the class ratio, yet it should be paired with an oversampling technique such as SMOTE to retain signal.

  • ✗

    Apply data normalisation (z-score) to all features

    Why it's wrong here

    Z-score normalisation rescales feature magnitudes onto a common scale; it changes nothing about the 99:1 class ratio, so minority-class recall stays poor. It is tempting because normalisation genuinely helps distance-based and gradient-based learners, and it would be correct where features differ wildly in units or range.

  • ✗

    Randomly shuffle the dataset to prevent train/test leakage

    Why it's wrong here

    Shuffling addresses row ordering and train/test leakage, not class imbalance; the 99:1 split remains untouched, so the model still ignores the minority class. It is tempting because shuffling is a genuine preprocessing step, and it would be the right choice when ordered data risks leaking distributional information into the test set.

About these practice questions

Courseiva writes every AI0-001 question from scratch — 962 in total, each with an explanation and a wrong-answer breakdown. None are copied from real exams or dumps. Learn why practice questions differ from exam dumps →

How Courseiva writes practice questions · Editorial policy

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 CompTIA exam blueprint

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.