InterviewStack.io LogoInterviewStack.io

Feature Engineering & Selection Basics Questions

Understand why features matter and basic techniques: scaling/normalization, handling categorical variables (one-hot encoding, label encoding), creating interaction features, and feature importance. Know that good features are as important as good algorithms. Understand why feature scaling matters for algorithms like KNN or linear models.

MediumTechnical
64 practiced
Implement a scikit-learn Pipeline using ColumnTransformer in Python that applies StandardScaler to numeric_cols and OneHotEncoder(handle_unknown='ignore') to categorical_cols, then trains a LogisticRegression with class_weight='balanced'. Signature: def build_and_train(X_train, y_train, numeric_cols, categorical_cols): -> returns fitted_pipeline. Include model persistence considerations.
EasyTechnical
62 practiced
Write Python code (without using sklearn scalers) to standardize numeric columns in a pandas DataFrame: subtract column mean and divide by column std. Signature: def zscore_scale(df, numeric_cols, ddof=0): -> returns scaled_df and stats_dict. Handle zero-variance columns by setting scaled values to 0 and preserve NaNs. Mention how you would persist the stats_dict for production use.
HardTechnical
69 practiced
Explain strategies to handle Missing Not At Random (MNAR) in a medical dataset where lab tests are ordered selectively for sicker patients. Discuss modeling missingness explicitly, using missingness indicators, joint modeling, multiple imputation approaches that include predictors of missingness, and causal considerations to avoid biased estimates.
EasyTechnical
63 practiced
Explain why feature engineering is often as important as algorithm choice in applied machine learning. Provide a concrete example: you have two binary classification pipelines with identical model architecture but different feature sets — describe scenarios where engineering better features would outperform switching to a more complex model. How would you prioritize feature work vs model tuning when time and compute are limited?
MediumTechnical
58 practiced
Implement a function in Python that computes mutual information (MI) between each feature and a binary target in a dataset containing both continuous and categorical features. Use scikit-learn's mutual_info_classif for numeric features and an appropriate estimator for categorical ones; include a discretization strategy for continuous features and return a ranked list of features by MI.

Unlock Full Question Bank

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

Sign in to Continue

Join thousands of developers preparing for their dream job.

40+ Feature Engineering & Selection Basics Interview Questions & Answers (2026) | InterviewStack.io