How would you compute target encoding on time-ordered data without leaking future information?
Role: Machine Learning Engineer
Category: Machine Learning
Difficulty: hard
Interview Round: Other
Overview: Explain how to build a target-encoded feature on time-ordered data so that each row uses only labels known before its prediction time. Tests leakage through K-fold encoding, same-timestamp rows, delayed labels and the smoothing prior, plus time-based validation and train/serve consistency.