Databricks Machine Learning Associate Question 536
Single answerYou are working on a machine learning project to predict housing prices based on various features like square footage, number of bedrooms, and the price of the house. During the exploratory data analysis phase, you notice that the target variable (price) spans several orders of magnitude, ranging from $10,000 to $10,000,000. Which scenario justifies applying a log scale transformation to the target variable?
- A
The target variable exhibits a right-skewed distribution, and you want to reduce the skewness.
- B
The target variable has a uniform distribution, and you want to center it around zero.
- C
The target variable contains negative values, and you want to stabilize variance.
- D
The target variable is already normally distributed, and you want to improve the model interpretability.
Show answer and explanation
Correct answer: A
Explanation
Log scale transformations are particularly useful when the target variable spans several orders of magnitude and exhibits a right-skewed distribution. By applying the log transformation, the data becomes less skewed, stabilizes variance, and becomes more suitable for regression models.
- A. Correct.
Correct. A log scale transformation is commonly used when the variable exhibits a right-skewed distribution, as it reduces skewness and makes the data more suitable for linear models.
- B. Incorrect.
Incorrect. A uniform distribution does not require log transformation, as the goal of log transformation is to address skewness or scale issues, not centering.
- C. Incorrect.
Incorrect. Log transformations cannot handle negative values because the logarithm of a negative number is undefined.
- D. Incorrect.
Incorrect. If the target variable is already normally distributed, applying a log transformation is unnecessary and could distort the distribution.