Advertisement
Guest User

Untitled

a guest
Aug 22nd, 2019
78
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 0.19 KB | None | 0 0
  1. # For positive data with no zeroes
  2. np.log(df["sales"])
  3.  
  4. # For positive data with zeroes
  5. np.log1p(df["sales"])
  6.  
  7. # Convert back - get predictions if target is log transformed
  8. np.expm1(df["sales"])
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement