Interview practice question
Target encoding caused overfitting
Machine Learning · Feature Engineering · Intermediate
After adding target-encoded merchant IDs, validation looks great but production performance drops. What went wrong?
What a strong answer covers
Your AI report card counts how many of these ideas you cover.
- Encoding likely computed on full training data including each row's own target.
- Rare merchants leak their labels.
- Use out-of-fold encoding with smoothing.
- Compute encodings only from past data for time-based problems.
- Re-evaluate with proper time-based validation.
Practise this topic
Start without signing up. Sign in free to get an AI report card on your answer.