Courseiva

AI0-001 Machine Learning and Deep Learning Practice Question

A data analyst wants to predict housing prices based on square footage, number of bedrooms, and location. Which machine learning approach is most suitable?

⚠ Common exam trap

A common mix-up: candidates confuse regression (predicting a continuous value) with classification or unsupervised learning, and incorrectly select decision tree regression or clustering because they see 'prediction' and assume any tree-based or grouping method works.

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 suitable approach because the problem involves predicting a continuous numeric target (housing prices) from multiple independent variables (square footage, bedrooms, location). Linear regression models the linear relationship between the features and the target, providing interpretable coefficients and efficient training for this type of regression task.

Answer analysis

Option-by-option breakdown

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

  • ✗

    K-means clustering

    Why it's wrong here

    K-means is unsupervised clustering, partitioning unlabelled data into groups; it cannot predict a continuous target such as price. It is tempting because it groups similar houses by features, which suits segmentation or market-basket exploration, but regression on labelled sales is required here.

  • ✗

    Decision tree regression

    Why it's wrong here

    Decision tree regression is unsuitable here because it produces piecewise constant predictions, assigning a single, discrete value to all data points within a leaf node, rather than a smoothly varying continuous output required for granular housing prices. While it is a valid regression technique for continuous targets, its output is a series of steps, not a truly continuous range. It is tempting as it handles continuous prediction, and would be appropriate for scenarios where the target variable can be effectively approximated by distinct, constant values across different feature segments, or as a base learner for ensemble methods.

  • ✗

    Association rule mining

    Why it's wrong here

    Association rule mining discovers co-occurrence relationships between items in transactional datasets, so it cannot model a continuous target such as price. It tempts for market-basket style problems, but predicting a numeric value from features like square footage, bedrooms and location requires supervised regression.

  • ✓

    Linear regression

    Why this is correct

    Linear regression models a continuous numeric target, here housing price, as a weighted linear combination of input features such as square footage, bedroom count, and location. This supervised regression approach directly fits predicting a continuous price value.

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.