when to know to which variables should the log transformation be applied ?
In the practical example, why is the nonlinearity fixed just by logging the variable Y (price)? Would it improve if the other variables / features were also logged?
1 answers ( 0 marked as helpful)
Hi Marta,
The opposite mathematical concept of a logarithm is an exponent.
Therefore, when you are observing a relationship which is exponential, you can apply a log transformation to reach a linear relationship.
Alternatively, if you are observing a log transformation, you can apply an exponential transformation to reach a linear relationship.
Note that a linear regression requires a linear relationship and that is why we are trying to achieve it!
Best,
The 365 Team