Databricks Machine Learning Associate Question 262
Single answerYou are training a regression model on a dataset where the target variable represents house prices. To normalize the data, you apply a logarithmic transformation to the target variable before training the model. After evaluating the model, you calculate the Root Mean Squared Error (RMSE) on the test set, but you notice that the RMSE value seems unusually low compared to the scale of the original house prices. What is the most likely reason for this discrepancy?
- A
The RMSE has not been exponentiated back to the original scale of the target variable.
- B
The features of the dataset were not normalized before training the model.
- C
The RMSE was calculated on the training set instead of the test set.
- D
The logarithmic transformation introduced bias in the predictions.
Show answer and explanation
Correct answer: A
Explanation
When a logarithmic transformation is applied to the target variable, evaluation metrics such as RMSE are computed in the transformed scale. To interpret the RMSE in the original scale of the target variable, it must be exponentiated back. Failing to do so can lead to confusion, as the reported RMSE will appear much smaller than the actual error in the original scale.
- A. Correct.
Correct. When the log transformation is applied to the target variable, the RMSE is computed in the log scale. To interpret the RMSE in the original scale, it must be exponentiated back.
- B. Incorrect.
Incorrect. While normalizing features can improve model performance, it does not directly affect how RMSE is calculated or interpreted.
- C. Incorrect.
Incorrect. Calculating RMSE on the training set could lead to over-optimistic results, but it does not explain the discrepancy caused by the log transformation.
- D. Incorrect.
Incorrect. Logarithmic transformation does not inherently introduce bias but may affect the interpretation of metrics if not properly accounted for.