In lesson 3, for the grocery competition, jeremy turns the sales into:
df_all.unit_sales = np.log1p(np.clip(df_all.unit_sales, 0, None))
The np.clip is supposed to remove negative sales and consider them as zero as per the competition. On checking the competition data description, it say:
Negative values of unit_sales represent returns of that particular item.
But it doesn’t ask us to change the negative sale values to zeroes.
And wouldn’t doing this change our prediction too?