Login to unlock
Machine Learning Fundamentals · Phase 2: Data Wrangling, Preprocessing & ML Workflow · Pipelines and ColumnTransformer

Pipelines and ColumnTransformer — Checkpoint Quiz

Checkpoint quiz 3 questions
Back to course

Check your understanding of this module before moving on.

?

Checkpoint quiz 3 questions

A quick check on this module's key ideas before you move on
0/3
Question 01

What does Pipeline.fit() do differently from manually calling fit_transform/transform yourself?

B is correct. A pipeline removes the opportunity for the fit-on-test-data bug entirely, rather than just relying on careful coding to avoid it.
Question 02

What does ColumnTransformer let you do that a single preprocessing step alone cannot?

B is correct. ColumnTransformer routes numeric columns to one transformer (like StandardScaler) and categorical columns to another (like OneHotEncoder), combining the results into one feature matrix.
Question 03

Why can a fitted Pipeline be passed directly into GridSearchCV or cross_val_score?

B is correct. Treating the pipeline as one object means cross-validation refits preprocessing fresh on each fold's training data, avoiding leakage across folds.