CLASSICAL ML ยท INTERVIEW QUESTION
What is feature engineering? Why is it important?
๐ข beginner ยท Feature Engineering
Hint: Transforming raw data into features that better represent the problem.
Answer
Feature engineering creates informative input features from raw data to improve model performance.
Types:
-
Numerical: scaling (StandardScaler, MinMax), binning, log/power transforms, polynomial features, interaction terms.
-
Categorical: one-hot encoding, target encoding, ordinal encoding, frequency encoding.
-
Text: TF-IDF, word counts, embeddings, n-grams.
-
Temporal: hour of day, day of week, time since event, rolling statistics.
-
Domain-specific: ratios, aggregations, lagged features.
Why important: good features can make a simple model outperform a complex model on raw data. The saying 'garbage in, garbage out' applies. Best practices: understand the domain, create features that capture the decision boundary, validate with feature importance analysis.
Note: deep learning reduces the need for manual feature engineering by learning representations automatically.
Related questions
- How do you handle missing data in ML? Compare different imputation strategies.
- What is overfitting? How do you detect and prevent it?
- Explain the difference between bagging and boosting. When would you use each?
- Compare K-Means, DBSCAN, and hierarchical clustering. When would you use each?
- What is cluster analysis and what are its main applications?