During development, a team wants to compare two model designs and choose settings before final evaluation. Which data set should guide those choices?
3 Training and Testing Online Quiz Questions
Use this free practice quiz with 20 questions to review 3 Training and Testing, test your knowledge, and prepare for your next test or exam.
A team needs to scale features before training a model. Which procedure avoids letting held-out data influence the learned scaling values?
- A
Fit the scaler on training data, then apply that fitted scaler to validation and test data.
- B
Fit separate scalers on training, validation, and test data so each set is centered independently.
- C
Fit the scaler on all available data before splitting so every partition uses the same statistics.
A model will be used to predict future outcomes from historical records. Which split best reflects that intended use?
- A
Randomly mix earlier and later observations between training and test sets.
- B
Train on later observations and evaluate on earlier observations.
- C
Train on earlier observations and evaluate on later observations.
A team repeatedly checks test-set scores and changes the model until those scores improve. This practice weakens the test set as an independent final estimate.
- A
True
- B
False
If a scaler calculates its values using test-set features, test information has influenced the modeling process even when the test labels were not used.
- A
True
- B
False
Which data set is used to fit a model's predictive parameters from examples and their targets?
A model uses the result of a medical test taken after a diagnosis to predict that earlier diagnosis. What is this kind of problem called?
After fitting a preprocessing transformation on the training set, use the same learned values on validation and test data with .
Keep records from the same person or household in the same .
During cross-validation, explain how using a pipeline for preprocessing and model fitting helps prevent leakage between the training and validation portions of each fold.
Select all split designs that help prevent information from crossing partitions in a way that would not be possible in the intended real-world use.
- A
Keep records from the same person or household together in one partition.
- B
For a task predicting earlier events, allow later observations into the training set.
- C
For a time-dependent prediction, train on earlier data and evaluate on later data.
- D
Place duplicate examples in both training and test sets to make comparisons consistent.
Every dataset should use the same fixed proportion for its training, validation, and test sets.
- A
True
- B
False
A dataset consists of independent examples with no group or time structure relevant to prediction. Which split approach may be suitable?
- A
Use a randomized split when the examples are independent.
- B
Use a randomized split even when records from the same person must stay together.
- C
Use a randomized split that allows future observations to train a model predicting the past.
A team has a small dataset and wants to use development data efficiently while preserving an independent final check when possible. Select all practices consistent with that goal.
- A
Train on some folds and validate on the remaining fold, repeating the process.
- B
Use the test set as one of the folds for choosing model settings.
- C
Keep a separate test set for final evaluation when possible.
A preprocessing step learns missing-value replacement values from the data. Which workflow best prevents information from held-out examples affecting those learned values?
- A
Fit an imputer on the full dataset, then split the data.
- B
Split the data first, then fit the imputer on training data.
- C
Fit separate imputers on the validation and test sets before applying them.
A model will be evaluated on a held-out test set. Which procedure correctly handles a scaler that learns feature means and standard deviations?
- A
Fit a scaler separately on the training, validation, and test sets.
- B
Fit the scaler on training data, then use that fitted scaler to transform validation and test data.
- C
Fit the scaler on the test set because it is used for the final evaluation.
- D
Fit the scaler on training and test data together, but exclude test labels.
A team calculates a feature scaler's mean and standard deviation using both training and test examples, but fits the predictive model using training labels only. What is the main concern?
- A
There is no leakage because the scaler does not use test labels.
- B
The scaler is safe as long as the model itself is fitted only on training rows.
- C
This leaks test-set information into the modeling process and may make evaluation overly optimistic.
- D
This is acceptable only when the test set is larger than the training set.
A model uses a medical test result taken after a diagnosis to predict that earlier diagnosis. What is the standard term for this problem?
A dataset contains multiple records for each person, and predictions will be made for people not represented in training. Which split strategy best limits information crossing between partitions?
- A
Keep all records from each person in the same partition.
- B
Randomly assign each record independently, regardless of person.
- C
Put each person's earliest record in training and later records in test.
- D
Place people with more records in the test set and everyone else in training.
Which data partition should be used for a final estimate of performance on unseen examples after model development and setting choices are complete?