Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up

Which practice prevents train-test contamination during preprocessing?

  1. A Splitting the data first and fitting scalers and encoders on the training split only
  2. B Scaling the whole dataset before splitting
  3. C Using the same random seed
  4. D Normalising the target variable
Answer

Splitting the data first and fitting scalers and encoders on the training split only

Using a scikit-learn Pipeline fits preprocessing inside each cross-validation fold automatically, eliminating this class of error structurally.

All Machine Learning MCQs

Login to manage your account

Please enter a valid email address.
Forgot Password?
Please enter a valid password.
OR

Don't have an account yet? Sign up as