nerdexam
Google

PROFESSIONAL-DATA-ENGINEER · Question #69

Why do you need to split a machine learning dataset into training data and test data?

The correct answer is B. To make sure your model is generalized for more than just the training data. Explanation/Reference: The flaw with evaluating a predictive model on training data is that it does not inform you on how well the model has generalized to new unseen data. A model that is selected for its accuracy on the training dataset rather than its accuracy on an unseen tes

Submitted by mateo_ar· Mar 30, 2026Operationalizing machine learning models

Question

Why do you need to split a machine learning dataset into training data and test data?

Options

  • ASo you can try two different sets of features
  • BTo make sure your model is generalized for more than just the training data
  • CTo allow you to create unit tests in your code
  • DSo you can use one dataset for a wide model and one for a deep model

How the community answered

(20 responses)
  • B
    95% (19)
  • C
    5% (1)

Explanation

Explanation/Reference: The flaw with evaluating a predictive model on training data is that it does not inform you on how well the model has generalized to new unseen data. A model that is selected for its accuracy on the training dataset rather than its accuracy on an unseen test dataset is very likely to have lower accuracy on an unseen test dataset. The reason is that the model is not as generalized. It has specialized to the structure in the training dataset. This is called overfitting.

Topics

#train test split#model generalization#overfitting#ML fundamentals

Community Discussion

No community discussion yet for this question.

Full PROFESSIONAL-DATA-ENGINEER Practice