MSE on a log-transformed target vs a different loss on raw revenue: what are the tradeoffs?

Quick Overview

Asks how training with MSE on a log-transformed revenue target compares with fitting a different loss on the raw target. Tests understanding of which statistic each loss estimates, retransformation bias, how zeros are handled, and how the choice should follow the way predictions are used.

MSE on a log-transformed target vs a different loss on raw revenue: what are the tradeoffs?

Role: Machine Learning Engineer

Category: Machine Learning

Difficulty: hard

Interview Round: Other

For a heavily right-skewed target like revenue, what are the tradeoffs between training with MSE on a log-transformed target versus using a different loss on the raw target? Revenue per customer usually looks like this: most values are small, and a long tail of very large accounts carries a big share of the total. ```hint Which number each loss estimates For each loss, ask which statistic of the conditional distribution minimizes it: the mean, the median, a quantile, or something else. ``` ```hint Back to dollars After training on the log scale you exponentiate the prediction. Compare that number with the expected revenue using Jensen's inequality. ``` ```hint Who gets the weight Compare how a 20% miss on a \$100 customer and a 20% miss on a \$100,000 customer are penalized under each loss. ``` ### What a Strong Answer Covers - Identifies which statistic each option estimates and why that matters when predictions are summed. - Explains the retransformation bias of the log model and at least one way to correct it. - Covers exact zeros and how each approach handles them. - Compares how each loss weights small and large customers, and how stable training is. - Gives a decision rule tied to how the predictions will be used, with evaluation on the original scale. ### Follow-up Questions - How does the Tweedie variance power change the fit, and how would you choose it? - Many customers have zero revenue. How would a two-part (hurdle) model compare with a single Tweedie model? - The residual variance of your log-MSE model depends on the features. What does that do to the smearing correction? - Which offline metrics would you report to compare the two approaches for a revenue forecast?

Overview: Asks how training with MSE on a log-transformed revenue target compares with fitting a different loss on the raw target. Tests understanding of which statistic each loss estimates, retransformation bias, how zeros are handled, and how the choice should follow the way predictions are used.

PracHub logo
General
Nov 25, 2026
hardMachine Learning EngineerOtherMachine Learning
0
0

For a heavily right-skewed target like revenue, what are the tradeoffs between training with MSE on a log-transformed target versus using a different loss on the raw target? Revenue per customer usually looks like this: most values are small, and a long tail of very large accounts carries a big share of the total.

What a Strong Answer Covers Guidance

  • Identifies which statistic each option estimates and why that matters when predictions are summed.
  • Explains the retransformation bias of the log model and at least one way to correct it.
  • Covers exact zeros and how each approach handles them.
  • Compares how each loss weights small and large customers, and how stable training is.
  • Gives a decision rule tied to how the predictions will be used, with evaluation on the original scale.

Follow-up Questions Guidance

  • How does the Tweedie variance power change the fit, and how would you choose it?
  • Many customers have zero revenue. How would a two-part (hurdle) model compare with a single Tweedie model?
  • The residual variance of your log-MSE model depends on the features. What does that do to the smearing correction?
  • Which offline metrics would you report to compare the two approaches for a revenue forecast?