A sanitized dataset has features whose scales differ by orders of magnitude. To maximize prediction accuracy in production, which sequence of steps should you follow before modeling?
Choose an answer
Tap an option to check your answer.
Correct answer: Split the dataset into training, validation, and test sets, then rescale the training set and apply the same scaling parameters to the validation and test sets..
Why this is the answer
The correct approach is to first split the data and then apply scaling. Scaling parameters (like mean and standard deviation for standardization, or min and max for normalization) should be learned only from the training set. These learned parameters are then applied to the validation and test sets to ensure that the model evaluates on data transformed consistently with what it was trained on, preventing data leakage. If you rescale the entire dataset first, information from the validation and test sets "leaks" into the scaling parameters, leading to an overly optimistic performance estimate. Rescaling each set independently is incorrect because it introduces inconsistencies in the feature scales across the different data splits, which would negatively impact model performance. Random sampling is a technique for reducing dataset size or balancing classes, not directly for handling differing feature scales.
Pass your exam — without the endless answer hunt
Get every verified question and explanation for this exam in one place, and save hours of prep. 1,000+ certifications · 20+ languages · free to start.
Pass your exam faster → No card needed