Skip to course content
Free course

Machine Learning Foundations / Module 7

Module 7 activity

Activity: Build a Clean Preprocessing Pipeline

Activity ID: ML-M07-A01 Estimated active time: 45-75 minutes

Goal

Produce the main Module 07 evidence: Pipeline notebook that reruns cleanly and documents training-only transformations.

Inputs

  • data/module_07_mixed_feature_pipeline_v1.csv
  • data/data-dictionary.md
  • notebooks/module-07-worked.ipynb
  • notebooks/module-07-practice.ipynb

Instructions

  1. Split the data before computing any transformation statistic.
  2. Build a pipeline that scales numeric columns and encodes categorical ones.
  3. Fit the pipeline on training data only, then apply it to validation.
  4. Deliberately compute a scaler on the full dataset, refit, and record the score difference.
  5. Explain which of the two numbers is honest and why.
  6. Write two limitations about what the pipeline does not handle.

Quality checklist

  • [ ] The split happens before any statistic is computed.
  • [ ] The pipeline is fitted on training data only.
  • [ ] Both scores are reported: leaked and correct.
  • [ ] The explanation identifies the leak precisely.
  • [ ] Limitations mention unseen categories or missing values.

Submission format

Submit the notebook output or worksheet table plus a 4-6 sentence explanation.

Safety note

Use only supplied fictional or synthetic data. Do not add or upload real learner data.