MLA-C01 Data Preparation for Machine Learning Practice Question
You are preparing a time-series dataset for a forecasting model. Which three steps are critical to prevent data leakage during preprocessing? (Choose three.)
⚠ Common exam trap
AWS often tests the misconception that standard preprocessing techniques like imputation or scaling can be applied globally to the entire dataset, when in time-series contexts they must be computed only from the training set to avoid leakage.
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 features using parameters computed only from the training set
Standardizing features using parameters computed only from the training set is critical because it prevents information from the test set from influencing the training data. If you compute the mean and standard deviation from the entire dataset before splitting, the test set's distribution leaks into the training process, causing the model to see future data during training. This violates the temporal order and leads to overly optimistic performance estimates.
Answer analysis
Option-by-option breakdown
For each option: why learners choose it and why it is or isn't the right answer here.
- ✗
Impute missing values using the mean of the entire dataset
Why it's wrong here
Using the full dataset mean leaks information from test data.
- ✓
Standardize features using parameters computed only from the training set
Why this is correct
Computing mean and variance only on training data prevents leakage from test.
- ✓
Use a time-based train/test split
Why this is correct
Ensures training data is chronologically before test data.
- ✓
Use only past data for feature engineering (e.g., lag features)
Why this is correct
Lag features based on past observations do not leak future information.
- ✗
Shuffle the data randomly before splitting
Why it's wrong here
Shuffling ignores time order, causing future data to influence training.
Go deeper
Related to this question
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 →
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.