Data Cleaning Exercises

Module 19

Analysis readiness

Train/test leakage, fitted transforms, reconciliation, distribution shift and transparent reports.
  1. Fit on training data only

    Learn fill values and other fitted transforms from training data only, apply them to test data, and flag what was imputed. · 9 min

  2. Report coverage with every number

    State how many records a statistic is based on and what was excluded, so readers can judge it. · 7 min

  3. Distribution shift

    Compare new data with the data a model or report was built on, and flag meaningful changes. · 7 min

  4. Fit, then apply

    Learn cleaning statistics on training rows and apply the stored values elsewhere. · 6 min

Module 19 quiz

Practice questions: choose an answer and check it to see the explanation. Nothing here is timed or graded.

  1. 1. You fill missing values with a median. What else should you record?
  2. 2. What is data leakage in cleaning?
  3. 3. You fill missing ages with a median. Which rows should the median come from?
  4. 4. What does reconciliation prove after cleaning?
  5. 5. What is distribution shift?
  6. 6. An analyst wants to drop all rows with any missing value before modelling. What should you check first?
  7. 7. Train median of x is 5, test median is 9. Test gaps are filled with which value?