Login to unlock
Machine Learning Fundamentals · Phase 4: Evaluation · Splitting Data the Right Way

Splitting Data the Right Way — Checkpoint Quiz

Checkpoint quiz 3 questions
Back to course

Check your understanding of this module before moving on.

?

Checkpoint quiz 3 questions

A quick check on this module's key ideas before you move on
0/3
Question 01

What does stratified sampling guarantee?

B is correct. Stratified sampling keeps each class's share of the data approximately the same in train and test, rather than leaving that to chance.
Question 02

Why does train_test_split shuffle data by default?

B is correct. An unshuffled split could put all early-collected rows in training and all later ones in test, making the split reflect a data-collection difference rather than genuine model quality.
Question 03

When should you switch from a random/stratified split to a chronological split?

B is correct. Time-ordered prediction tasks need a chronological split; otherwise the model can implicitly learn from the future to predict the past, the temporal leakage problem.