Loading...
Loading...
Browse 5 real-world technical and behavioral interview questions about Feature engineering. Review scenarios, edge cases, and architectural best practices.
The feature encodes the outcome, so the model reads the answer rather than predicting it. Offline the label and the feature come from the same snapshot, which is why validation looks excellent; in production the feature is empty at scoring time and the signal vanishes. Fix by defining features by when they were available and validating on a forward time split.
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.
Plot the series first, then use a decomposition and an ADF or KPSS test to separate trend from seasonality from noise. Difference or transform away a trend, use Fourier terms when several seasonal periods coexist, and treat holidays and calendar structure as features rather than outliers.
Check whether training and serving compute the same features from the same definitions, because the usual cause is two implementations that disagree slightly. Nothing raises an error when they diverge - the model receives plausible numbers that mean something different from the ones it learned on.
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.