← All Data Science Flashcard Decks

Feature Engineering and Selection Flashcards

7 cards from real Data Science practice questions. Tap to flip, then mark Knew It or Still Learning — missed cards come back until you master them.

Read the first 7 Feature Engineering and Selection flashcards as text
  1. You apply a log transformation to a right-skewed feature containing zero values. What problem will this cause?

    Answer: log(0) is undefined/negative infinity

    log(0) is undefined, so a constant (e.g., log1p) must be added before transforming zeros.

  2. Which technique creates new features by multiplying or combining two existing features?

    Answer: Interaction features

    Interaction features capture combined effects by multiplying or otherwise combining existing variables.

  3. When applying one-hot encoding to a feature with very high cardinality, the main drawback is:

    Answer: A large, sparse feature space that increases dimensionality

    High-cardinality one-hot encoding produces many sparse columns, dramatically increasing dimensionality.

  4. Target encoding replaces a category with what value?

    Answer: The mean of the target for that category

    Target (mean) encoding maps each category to the average target value observed for it.

  5. Which scaling method is most robust to outliers?

    Answer: Robust scaling using median and IQR

    RobustScaler uses the median and interquartile range, making it resistant to outliers.

  6. Binning a continuous variable into discrete intervals is primarily used to:

    Answer: Reduce the effect of minor observation errors and capture non-linearity

    Binning reduces noise from small measurement variations and can model non-linear effects.

  7. A polynomial feature of degree 2 on feature x adds which term?

    Answer: x squared

    Degree-2 polynomial expansion adds x² (and cross terms for multiple features).