Databricks Machine Learning Associate Question 258
Single answerYou are training a regression model to predict housing prices, but the target variable (price) has a highly skewed distribution. To address this, you apply a log transformation to the label before training the model. After evaluating the model, you calculate the RMSE on the log-transformed scale. Why would you need to exponentiate the RMSE to interpret it correctly in the context of the original scale?
- A
Exponentiating the RMSE converts the error back to the original scale of the target variable, making it interpretable in real-world terms.
- B
Exponentiating the RMSE corrects for any bias introduced by the log transformation.
- C
Without exponentiation, the RMSE would represent multiplicative error instead of additive error.
- D
Exponentiating the RMSE ensures the error is scaled correctly for logarithmic distributions.
Show answer and explanation
Correct answer: A
Explanation
When a log transformation is applied to the target variable, the RMSE is calculated in the log-transformed scale. To interpret the RMSE back in terms of the original target variable (e.g., housing prices), exponentiation is required. This ensures the error is expressed in the same scale as the original target variable, making it meaningful and interpretable for domain-specific applications.
- A. Correct.
Correct. When the log of the label is used, RMSE is calculated on the log scale. To interpret the error in the context of the original target variable, the RMSE must be exponentiated to reverse the log transformation and reflect the error in the original units.
- B. Incorrect.
Incorrect. The log transformation does not introduce bias; it is used to stabilize variance or normalize skewed distributions. Exponentiating the RMSE does not correct for bias.
- C. Incorrect.
Incorrect. RMSE represents the square root of the average squared error, not multiplicative error. Exponentiating the RMSE does not change the type of error but adjusts the scale.
- D. Incorrect.
Incorrect. Exponentiating the RMSE is unrelated to the scaling of logarithmic distributions. It is done to revert the RMSE to the original scale of the target variable.