I can't find some documentation. I had right-skewed target (sale price) variable and also some skewed features at the same way. I did log transformation and fit the regression model and it doing well. But I can't understand how I can return to normal sale price. Please, someone explain me
Asked
Active
Viewed 24 times
1 Answers
1
Exponentiation is the inverse function of logarithms. You can return to the original sale price like this:
$orignal = B^{x}$
where $B$ is the logarithm base and $x$ is the log-transformed sale price.
For example, a natural log transform is reversed by $f(x) = e^x$ and log base 10 is reversed by $f(x) = 10^x$
zachdj
- 2,624
- 6
- 13
-
But I thougt that I need maybe something add because I also transform some features – Olha Jun 13 '22 at 18:59
-
If I understand correctly, you have several log-transformed features which are input to a model. The model is trained to predict a log-transformed target. You can go from the logarithmic target back to original sale price with an exponential function as described. No need to transform the features back into the original space – zachdj Jun 13 '22 at 20:33