Databricks Machine Learning Associate Question 537
Select 2You are building a regression model in Databricks to predict housing prices based on various features. One of the features, 'lot size', has values ranging from 100 to 1,000,000 square feet. You notice that the distribution of 'lot size' is highly skewed to the right, with most values concentrated between 100 and 10,000 but a few extreme outliers. Which of the following scenarios would justify applying a log scale transformation to the 'lot size' feature?
- A
When you want to reduce the impact of extreme outliers on the model.
- B
When the feature shows a normal distribution and does not exhibit skewness.
- C
When the relationship between 'lot size' and the target variable appears exponential rather than linear.
- D
When you want to improve the interpretability of the model coefficients for 'lot size'.
- E
When the values of 'lot size' are already scaled between 0 and 1.
Show answer and explanation
Correct answers: A, C
Explanation
Log scale transformations are typically applied when features exhibit skewness or when extreme outliers dominate the range of values. In this scenario, the 'lot size' feature is highly skewed, and its relationship with the target variable appears exponential, making a log transformation appropriate. The transformation compresses the scale of large values and linearizes exponential relationships, improving model performance and interpretability.
- A. Correct.
Correct: A log scale transformation is effective in reducing the impact of extreme outliers by compressing large values while preserving smaller ones, which helps in handling skewed data.
- B. Incorrect.
Incorrect: If the feature already shows a normal distribution, a log scale transformation is unnecessary and might distort the data.
- C. Correct.
Correct: A log scale transformation can linearize exponential relationships, making it easier for regression models to learn such patterns.
- D. Incorrect.
Incorrect: While log transformations can sometimes improve interpretability, it is not their primary purpose and is not directly related to this scenario.
- E. Incorrect.
Incorrect: If the values are already scaled between 0 and 1, there is no need for a log transformation since the range has already been normalized.