Courseiva

AI0-001 Machine Learning and Deep Learning Practice Question

A team wants to predict monthly sales using historical data. Which algorithm is most appropriate?

⚠ Common exam trap

CompTIA often tests the distinction between regression and classification algorithms, and the trap here is that candidates may confuse 'regression' in logistic regression with continuous prediction, not realizing it is actually a classification algorithm.

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

✓

Linear regression

Linear regression is the most appropriate algorithm because the goal is to predict a continuous numerical value (monthly sales) based on historical data. It models the relationship between input features and the target variable by fitting a linear equation, making it ideal for regression tasks where the output is a real number.

Answer analysis

Option-by-option breakdown

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

  • ✓

    Linear regression

    Why this is correct

    Monthly sales is a continuous numeric target, so regression rather than classification applies. Linear regression models the relationship between historical input variables and the sales figure directly, producing a predicted value. It satisfies the forecasting constraint with a simple, interpretable model suited to this trend-based prediction task.

  • ✗

    K-means

    Why it's wrong here

    K-means partitions records into clusters by similarity and produces no predictive model for a numeric target. It is tempting because it is a common algorithm for segmenting customers or products, and would be correct for grouping historical sales records rather than forecasting future values.

  • ✗

    Decision tree

    Why it's wrong here

    A decision tree excels at classification and identifying discrete categories, but it struggles to model continuous numerical trends like monthly sales over time. Its piecewise constant prediction makes it ill-suited for forecasting a specific numerical value. It might tempt the candidate because decision trees are versatile and can be adapted for regression, but their inherent structure is not optimised for capturing the sequential nature and smooth progression of sales data.

  • ✗

    Logistic regression

    Why it's wrong here

    Logistic regression predicts a categorical outcome, so it cannot output the continuous monthly sales figure required. It is tempting because it is a standard regression technique, and it would be correct if the target were binary, such as whether sales exceed a threshold.

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 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.