y=np.log10(train_set["SalePrice"])
how do i find inverse of this ?? I want it to return back to the original value and not the scaled value
have a look here for logarithm inversion: https://www.rapidtables.com/math/algebra/Logarithm.html
10 ** y
should do the trick for you here
Hope the above answers were helpful, in case you or anyone want the inverse for log10 (base 10) and log (natural)
# Logarithm and back to normal value
y = np.log10(train_set["SalePrice"])
train_set["SalePrice"] = 10 ** y
# Natural log and back to normal value using built-in numpy exp() function
y = np.log(train_set["SalePrice"])
train_set["SalePrice"] = np.exp(y)
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With