Data Cleaning Exercises

Capstone · Data science team predicting customer churn

Build a leak-free training table for a churn model

The data science team's last churn model looked excellent offline and failed in production. Review found that gaps were filled with statistics computed on all rows, extreme but real values were deleted, and dates were parsed with the wrong day/month order for UK customers.

Prepare the training and test tables again so that nothing learned from the test rows influences cleaning, real extremes are flagged rather than removed, and every date is parsed by its declared locale.

Checkpoints

  1. 1. Gaps filled with the median learned from training rows only.

    Fill gaps with a median learned from training data only
  2. 2. Large values flagged for review; no rows deleted.

    Flag large transactions, keep refunds
  3. 3. Dates parsed by locale; ambiguous ones quarantined.

    Parse dates by declared locale
  4. 4. Yes/no features parsed; unknown spellings kept as exceptions.

    Keep identifiers as text and parse yes/no flags

Final quality report

Write it in your private notes below (saved to your account) or in your own document. It isn't auto-graded; use it to practise the handoff interviewers ask about.

  • Which statistics were fitted and on which rows.
  • How many values were flagged versus quarantined, and why none were deleted.
  • The leakage you removed compared with the previous table, with one example.
  • Checks the team should run before each retraining.

Sign in to bookmark this and keep private notes.