Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- # 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"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement