nerdexam
Amazon

MLS-C01 · Question #264

An online store is predicting future book sales by using a linear regression model that is based on past sales data. The data includes duration, a numerical feature that represents the number of…

The correct answer is C. Quantile binning. When a numerical feature has a skewed, non-linear relationship with the target variable, quantile binning (C) is the appropriate transformation. Quantile binning divides the feature values into equal-frequency buckets (e.g., quartiles or deciles), effectively converting the…

Modeling

Question

An online store is predicting future book sales by using a linear regression model that is based on past sales data. The data includes duration, a numerical feature that represents the number of days that a book has been listed in the online store. A data scientist performs an exploratory data analysis and discovers that the relationship between book sales and duration is skewed and non- linear. Which data transformation step should the data scientist take to improve the predictions of the model?

Options

  • AOne-hot encoding
  • BCartesian product transformation
  • CQuantile binning
  • DNormalization

How the community answered

(57 responses)
  • A
    9% (5)
  • B
    5% (3)
  • C
    84% (48)
  • D
    2% (1)

Explanation

When a numerical feature has a skewed, non-linear relationship with the target variable, quantile binning (C) is the appropriate transformation. Quantile binning divides the feature values into equal-frequency buckets (e.g., quartiles or deciles), effectively converting the continuous skewed variable into an ordinal or one-hot-encoded categorical feature. This removes the assumption of linearity between 'duration' and 'sales' and allows the linear regression model to capture non-linear patterns across different ranges of the feature. One-hot encoding (A) is for categorical features, not continuous numerical ones. Cartesian product transformation (B) creates interaction terms between features but does not address skewness in a single feature. Normalization (D) rescales the range of values but preserves the underlying non-linear distribution and does not address the skewed relationship with the target.

Topics

#Data Transformation#Feature Engineering#Linear Regression#Non-linear Relationships

Community Discussion

No community discussion yet for this question.

Full MLS-C01 Practice