MLCrack

    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:

    1. Numerical: scaling (StandardScaler, MinMax), binning, log/power transforms, polynomial features, interaction terms.

    2. Categorical: one-hot encoding, target encoding, ordinal encoding, frequency encoding.

    3. Text: TF-IDF, word counts, embeddings, n-grams.

    4. Temporal: hour of day, day of week, time since event, rolling statistics.

    5. 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.