InterviewStack.io LogoInterviewStack.io

Feature Engineering and Selection Questions

Covers the end to end process of transforming raw data into predictive and stable model inputs and choosing the most useful subset of those inputs. Topics include generating features from domain signals and timestamps, numerical transformations such as scaling binning and logarithmic transforms, categorical encodings including one hot and target encoding, creation of interaction and polynomial features, construction of dense feature vectors for model consumption, handling missing values and outliers, and strategies for class imbalance. Also includes feature selection and dimensionality reduction methods such as filter techniques statistical tests wrapper methods embedded model based selection mutual information analysis and tree based importance measures. Emphasis is placed on avoiding data leakage validating feature stability over time interpreting feature contributions and documenting rationale for feature creation or removal. For senior roles include designing feature engineering best practices mentoring others and considering feature impact on model interpretability and business metrics.

MediumTechnical
27 practiced
You have a high-cardinality categorical feature (product_id with ~100k unique values). Describe at least five distinct encoding strategies you could use, discuss trade-offs in model performance, memory/serving cost, and robustness, and explain how you'd handle unseen values at inference time for each approach.
EasyTechnical
27 practiced
Explain class imbalance and list three feature-level strategies (not model-level class weighting) to mitigate its impact before model training. For each strategy, describe a situation where it helps and where it might introduce problems.
EasyTechnical
23 practiced
Describe the differences between standard scaling (z-score), min-max scaling, and robust scaling for numerical features. For each method, explain when you would prefer it (outliers, model assumptions, interpretability) and name the corresponding sklearn transformer class you would use in Python.
MediumSystem Design
20 practiced
Design a test and CI strategy to ensure that newly implemented engineered features do not leak future information into training or evaluation. Include unit tests for transformation logic, integration tests that simulate time-based splits, and data-contract checks you would run in continuous integration before merging feature code.
EasyTechnical
21 practiced
Explain cyclical encoding for timestamp-derived features (for example, hour-of-day and day-of-week). Show the mathematical transform you would use to encode an 'hour' column into two features and explain why cyclical encoding is preferred over integer encoding for periodic signals.

Unlock Full Question Bank

Get access to hundreds of Feature Engineering and Selection interview questions and detailed answers.

Sign in to Continue

Join thousands of developers preparing for their dream job.