โ† All Data Science with Python Certification Flashcard Decks

Data Science with Python Feature Engineering Techniques Flashcards

7 cards from real Data Science with Python Certification practice questions. Tap to flip, then mark Knew It or Still Learning โ€” missed cards come back until you master them.

Read the first 7 Data Science with Python Feature Engineering Techniques flashcards as text
  1. Which technique creates new features by computing the interaction between two existing numerical features?

    Answer: Polynomial feature expansion

    Polynomial feature expansion generates interaction terms and higher-degree powers of existing numerical features using sklearn's PolynomialFeatures.

  2. What is the primary risk of applying target encoding before performing cross-validation?

    Answer: Data leakage from the target variable

    Applying target encoding before cross-validation leaks target information into the training folds, causing overly optimistic model evaluation.

  3. When using pandas to extract the day-of-week from a datetime column, which method returns an integer (0=Monday, 6=Sunday)?

    Answer: dt.weekday

    The dt.weekday accessor returns an integer from 0 (Monday) to 6 (Sunday) for each datetime value in a pandas Series.

  4. Which binning strategy creates intervals where each bin contains approximately the same number of observations?

    Answer: Quantile-based binning

    Quantile-based binning (e.g., pd.qcut) divides data so each bin holds roughly equal numbers of samples, handling skewed distributions well.

  5. What does the 'handle_unknown' parameter control in sklearn's OneHotEncoder?

    Answer: Behavior when an unseen category appears at transform time

    handle_unknown='ignore' causes OneHotEncoder to output all-zero rows for unseen categories at transform time, preventing errors on new data.

  6. Which feature selection method ranks features by computing a statistical test between each feature and the target, independently of any model?

    Answer: Univariate feature selection

    Univariate feature selection (e.g., sklearn's SelectKBest) scores each feature individually using a statistical test such as f_classif or chi2.

  7. What is the purpose of applying a Box-Cox transformation to a numerical feature?

    Answer: Stabilize variance and make the distribution more Gaussian

    The Box-Cox transformation applies a power transformation to make a feature's distribution closer to normal and stabilize its variance across the range.

How this page was made: written with AI tools and published by Nathan Beja, founder of Practice Test Geeks, who is responsible for its content. We have not yet matched this exam's facts to an official source, so confirm fees, dates and rules with the exam body. Not reviewed by a subject-matter expert. Editorial policy