A pipeline-free workflow calls scaler.fit_transform(X_test) before evaluating a model. What is the consequence?
Correct answer
A. Test statistics leak into preprocessing, so the reported score is optimistically biased
17 views
A. Test statistics leak into preprocessing, so the reported score is optimistically biased
17 views
Data leakage occurs when information from the evaluation set influences preprocessing: fitting the scaler on test data lets its mean and variance shape the transformation, so the set is no longer unseen. The rule is to fit on the training fold and only call transform on the test fold. Wrapping the scaler and estimator in a Pipeline makes cross-validation enforce this automatically.
Asked in: NTS, PPSC IT, Interviews
Not sure why the answer is A? Ask here and get an explanation.