A media lab standardizes each viewing-hours feature using the mean and spread of the entire table, then splits the rows into training and holdout. What went wrong?
Select an answer to reveal the explanation.
Short Explanation
Fitting the scaler on the whole table is like letting the answer key nudge the class average before the quiz is divided. You leaked holdout viewing hours into the means and spreads used for training. The trap is blaming the random split, or blaming standardization itself, instead of when the scaler was fit.
Full Explanation
A preprocessor such as standardization must be fit on the training rows alone and then applied to the holdout with those saved statistics. The lab computed each feature's mean and spread on the entire table before the split, so the holdout rows shifted the very numbers used to rescale the training features. That is leakage: the holdout is no longer untouched, and the training representation carries information from rows that were supposed to stay out of the fit. Using only the holdout mean and spread would be a worse reversal; those rows are the ones that must not determine the transform. Standardization is a legitimate rescaling for viewing hours, and the failure does not depend on which common scaler formula was chosen; it depends on fitting that formula before the split. Calling the flaw a sample-size complaint misnames a leak of feature statistics. Exam caveat: the same rule covers any statistic learned from the rows, including ranges and encoding maps, not only means and spreads. Operational check: refit the scaler on the training rows only, transform the holdout with those saved training statistics, and confirm no holdout row entered the mean or the spread.