Created
August 9, 2019 21:38
-
-
Save kxzk/3fe3a7dcaabd82a350807808598d7366 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
# For positive data with no zeroes | |
np.log(df["sales"]) | |
# For positive data with zeroes | |
np.log1p(df["sales"]) | |
# Convert back - get predictions if target is log transformed | |
np.expm1(df["sales"]) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment