Skip to content
Preptima

Feature Engineering & Leakage interview questions

Encoding, scaling and interaction terms, target and temporal leakage, train-serve skew, and the features that quietly encode the label.

3 questions in Machine Learning.

medium2

mediumConceptCoding

One of your features is a postcode with about 40,000 distinct values. How do you encode it?

One-hot is unusable at that width, so the options are frequency encoding, smoothed target encoding, hashing, or a library's native categorical handling. Target encoding is the strongest and the most dangerous, because it must be fitted inside each fold or it leaks the label. Use this categorical encoding answer to show the decision, trade-off, and evidence rather than a memorised definition.

5 minmid, senior
mediumConceptScenario

What is target leakage, and how would you catch it before the model ships?

Target leakage happens when a feature contains information that would not be available at prediction time. Catch it by auditing feature creation times, window boundaries, post-label columns and suspiciously strong validation performance. Use this data leakage answer to show the decision, trade-off, and evidence rather than a memorised definition.

5 minmid, senior, staff

hard1

hardDesignScenario

Where does train-serve skew come from, and how do you stop it?

Train-serve skew is a mismatch between features used in training and features produced at serving time. Prevent it with shared transformations, point-in-time joins, feature logging, schema checks and monitoring of served feature distributions. It also connects feature store to the point an interviewer is testing.

6 minmid, senior, staff