🎙 Free live masterclass · Sun, 29 Nov, 7:00 pm IST · Java Full Stack roadmap Register free →
Skills101
← Quiz: Evaluation and Tuning: all 10 questions

Quiz: Evaluation and Tuning · Question 3 of 10

Why put StandardScaler inside a Pipeline?

Why put StandardScaler inside a Pipeline?

  1. A.It runs faster
  2. B.So scaling is learned only from the training data in each fold, avoiding leakage
  3. C.Pipelines can't contain models otherwise
  4. D.To convert text to numbers
Answer & explanation

Correct answer: So scaling is learned only from the training data in each fold, avoiding leakage

Scaling on all data first leaks test information.

Can you get the rest right without peeking?

Take the timed Quiz: Evaluation and Tuning quiz free. Pass it to earn XP and count towards your certificate.

Start the quiz →