Databricks Machine Learning Associate Question 612
Single answerYou are building a regression model to predict house prices. To normalize the distribution of the target variable, you apply a log transformation. After training the model, you calculate the Mean Absolute Error (MAE) using the model's predictions and the log-transformed target variable. What must you do to ensure the MAE is correctly interpreted in terms of the original house prices?
- A
Exponentiate the model predictions and calculate MAE using the original target variable.
- B
Exponentiate the log-transformed target variable, then calculate MAE using the transformed predictions.
- C
Calculate MAE directly using the log-transformed predictions and log-transformed target variable.
- D
No additional steps are needed since MAE is scale-invariant.
Show answer and explanation
Correct answer: A
Explanation
When using log-transformed target variables in regression tasks, any evaluation metric like MAE must be computed on the original scale to ensure interpretability. This requires exponentiating the model's predictions back to the original scale before calculating metrics. Failure to do this will result in metrics that are in the log-transformed scale, making them difficult to interpret in the context of the original data.
- A. Correct.
Correct. Since the target variable was log-transformed, you must exponentiate the model predictions to bring them back to the original scale. Then, calculate MAE using the original target variable to ensure it is interpretable in terms of the actual house prices.
- B. Incorrect.
Incorrect. Exponentiating the target variable but not the predictions will result in mismatched scales, leading to incorrect evaluation.
- C. Incorrect.
Incorrect. Calculating MAE directly on the log-transformed values will result in an error that is not interpretable in the context of the original house prices, as it is in the log scale.
- D. Incorrect.
Incorrect. MAE is not scale-invariant; it depends on the scale of the variables. Without exponentiating the predictions, the error will remain in the log-transformed scale.