How to revert np.log(data) and data.diff()?
I have used np.log(data)
and then applied data.diff()
to transform my data in timeseries model. I have the predictions. How do I convert it back to normal scale?
Here is an example for your reference:
--------------------------------------------------------------------
| sales | np.log(sales) | (np.log(sales)).diff() | predictions |
--------------------------------------------------------------------
|166.594019 | 5.115560 | -0.045918 | -0.045918 |
--------------------------------------------------------------------
Note: I have provided only one example which from index 2 as the first value after data.diff() will be null. And hence the prediction at index 1 is 0.
Topic transformation numpy arima time-series python
Category Data Science