AI0-001 AI Concepts and Techniques Practice Question
A data scientist needs to select a regression model to predict house prices. The dataset contains many features, some of which are irrelevant. Which TWO algorithms are BEST suited for this scenario, and why? (Select TWO)
⚠ Common exam trap
The trap is treating Ridge and Lasso as interchangeable regularizers — candidates forget that only L1 (Lasso) produces sparse solutions that zero out irrelevant features, which is the key requirement in this scenario.
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
✓
Lasso regression (L1 regularization)
Lasso regression (L1 regularization) is correct because its L1 penalty drives the coefficients of irrelevant features exactly to zero, performing automatic feature selection and yielding a sparse, interpretable model well suited to a dataset with many useless predictors. Random Forest is correct because its ensemble of decorrelated decision trees handles high-dimensional feature spaces robustly, captures non-linear relationships and interactions between features, and provides built-in feature-importance scores that tolerate irrelevant variables without overfitting as easily as a single model. Linear regression is not appropriate because it uses all features with no regularization, so irrelevant predictors inflate variance and degrade generalization. Ridge regression shrinks coefficients toward zero but never eliminates them, so it does not perform feature selection. K-Nearest Neighbors is distance-based and suffers from the curse of dimensionality, making it a poor choice when many features are irrelevant.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Ridge regression (L2 regularization)
Why it's wrong here
Ridge regression shrinks coefficients toward zero but retains every feature, so irrelevant variables still contribute to predictions rather than being eliminated. It is tempting because L2 regularization does reduce overfitting, and would be the right choice when many features each carry small, genuine effects that must all be kept.
- ✗
Linear regression
Why it's wrong here
Ordinary linear regression assumes all supplied features are relevant and assigns each a non-zero coefficient, so irrelevant variables inflate variance and destabilise predictions. It is tempting because it is the baseline regression method, and would be correct when the feature set is already known to be small, relevant and linearly related to the target.
- ✓
Lasso regression (L1 regularization)
Why this is correct
Lasso applies L1 regularisation, which drives irrelevant feature coefficients exactly to zero, performing automatic feature selection. This directly addresses the stem's many-features-with-some-irrelevant constraint, yielding a sparser, more interpretable model than ridge's L2 penalty, which shrinks but never eliminates coefficients.
- ✗
K-Nearest Neighbors
Why it's wrong here
K-Nearest Neighbors is distance-based and treats every feature as equally informative, so irrelevant attributes distort the neighbour metric and degrade predictions unless feature selection is applied first. It is tempting because it handles non-linear relationships, and would suit smaller, well-scaled datasets where all features are genuinely relevant.
- ✓
Random Forest
Why this is correct
Random Forest averages many decorrelated decision trees, each split on a random feature subset, so irrelevant features rarely dominate any tree. This ensemble robustness handles the stem's noisy, many-feature dataset without manual selection, and captures non-linear relationships that plain linear regression would miss.
About these practice questions
One of 962 original AI0-001 practice questions on Courseiva, each with a full explanation and wrong-answer analysis — not exam dumps or protected exam content. Learn why practice questions differ from exam dumps →
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.