Courseiva
Data Preparation for Machine LearningeasyMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A machine learning engineer is building a regression model to predict house prices. The feature 'square_footage' has values ranging from 500 to 10,000, while 'num_bedrooms' ranges from 1 to 10. Which preprocessing step is most critical before training a model that uses gradient descent?

⚠ Common exam trap

AWS often tests the distinction between scaling for gradient-based optimizers versus other preprocessing steps like encoding or transformation, trapping candidates who confuse feature scaling with handling outliers or categorical data.

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

Standardize both features to have zero mean and unit variance.

Gradient descent is sensitive to the scale of features because it updates weights proportionally to the feature values. With 'square_footage' (500–10,000) and 'num_bedrooms' (1–10), the large range difference causes the loss function's contours to be elongated, leading to slow or unstable convergence. Standardizing both features to zero mean and unit variance ensures each feature contributes equally to the gradient updates, enabling faster and more reliable optimization.

Answer analysis

Option-by-option breakdown

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

  • Standardize both features to have zero mean and unit variance.

    Why this is correct

    Standardization brings features to a common scale, crucial for gradient descent.

  • Apply a logarithmic transformation to both features.

    Why it's wrong here

    Log transformation addresses skew, not scale differences across features.

  • Encode the 'num_bedrooms' feature using one-hot encoding.

    Why it's wrong here

    One-hot encoding is for nominal categorical data, not for ordinal or continuous.

  • Impute missing values using the mean of the feature.

    Why it's wrong here

    Missing values are not stated; the primary issue is scale.

About these practice questions

Courseiva writes every MLA-C01 question from scratch — 835 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 MLA-C01 practice question is part of Courseiva's free Amazon Web Services 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 MLA-C01 exam.