Courseiva
Data Preparation for Machine LearninghardMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A data scientist is preparing data for a regression model. The target variable has a skewed distribution. The scientist wants to apply a log transformation to make it closer to normal. Which step should be taken before applying log transformation?

⚠ Common exam trap

AWS often tests the assumption that candidates will confuse data normalization or centering with the domain restriction of the log function, leading them to pick standardization or mean-centering as a preparatory step.

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

Ensure all values are positive

The log transformation is defined only for positive real numbers; applying it to zero or negative values results in undefined or complex outputs. Therefore, before applying a log transformation, you must ensure all values in the target variable are positive, typically by adding a constant (e.g., log(x + 1)) if zeros are present. This step is a fundamental data preparation requirement for log transformations in regression modeling.

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 the data to zero mean and unit variance

    Why it's wrong here

    Standardization can also result in negative values.

  • Remove outliers using IQR

    Why it's wrong here

    Outlier removal is unrelated to the prerequisite of positive values for log.

  • Ensure all values are positive

    Why this is correct

    Log is undefined for zero and negative values. If present, add a constant or use other transformations.

  • Center the data by subtracting the mean

    Why it's wrong here

    Centering can introduce negative values, making log transformation invalid.

About these practice questions

One of 835 original MLA-C01 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 →

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.