Courseiva
Data Preparation for Machine LearninghardMultiple ChoiceObjective-mapped

MLA-C01 Data Preparation for Machine Learning Practice Question

A machine learning team is building a model to predict customer churn. They have historical data that includes customer activity logs, each with a timestamp. The team wants to ensure that the training data does not contain any data leakage from the future. Which approach should they take when preparing the training and validation datasets?

⚠ Common exam trap

AWS often tests the concept of data leakage in time-series contexts, where candidates mistakenly choose random splits or cross-validation with shuffling, overlooking that temporal order must be preserved to avoid future data leaking into training.

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

Split the data by time, using data before a certain date for training and after for validation

Splitting by time (chronological split) prevents data leakage by ensuring that the validation set contains only future data relative to the training set. In time-series or timestamped data, random splits can allow the model to learn from future patterns, artificially inflating performance. This approach respects the temporal dependency inherent in customer churn prediction.

Answer analysis

Option-by-option breakdown

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

  • Use stratified sampling based on churn label

    Why it's wrong here

    Stratified sampling does not consider time order.

  • Randomly split the data 80/20 for training and validation

    Why it's wrong here

    Random split may cause temporal leakage if not time-aware.

  • Use k-fold cross-validation with shuffling

    Why it's wrong here

    Shuffling can mix future data into training folds.

  • Split the data by time, using data before a certain date for training and after for validation

    Why this is correct

    Time-based split ensures no future data influences training.

About these practice questions

This MLA-C01 question is part of Courseiva's 835-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 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.